What is really going on in politics? Get our daily email briefing straight to your inbox Sign up Thank you for subscribing We have more newsletters Show me See our privacy notice Invalid Email

High Court judges have declared emergency Government snooping laws illegal after two MPs challenged them.

The Data Rentention and Investigatory Powers Act (Dripa) allowed UK spooks to carry on storing massive amounts of data from private phone calls and emails.

It was rushed through parliament in July 2014, after a European court ruled the mass collection of emails a breach of British citizens privacy.

High Court judges struck down two parts of DRIPA as unlawful as they breached EU privacy rules.

Read More: Cops still spying on journalists "without judicial approval"

The ruling has alarmed the Government.

Security Minister John Hayes said: "We disagree absolutely with this judgment and will seek an appeal."

The judges granted Home Secretary Theresa May permission to appeal because of the public importance of their decision.

Conservative former shadow home secretary David Davis and Labour backbencher Tom Watson brought the legal challenge with campaigning members of the public Peter Brice and Geoffrey Lewis.

The law was passed by a Commons landslide, after the Government claimed it was essential to fight terrorism, organised crime and online child abuse.

But Watson said the new law had been "botched", and said none of the MPs voting for it had been given the chance to read it, let alone scrutinise it.

(Image: Getty)

The MPs applied for judicial review, saying they were concerned to protect the confidentiality of their contacts with constituents and other members of the public - including whistleblowers - who might approach them with sensitive information.

Lord Justice Bean and Mr Justice Collins declared that Section 1 of Dripa was flawed because it did not lay down clear and precise rules "strictly restricting" data retention to the purpose of preventing and detecting "precisely defined serious offences, or of conducting criminal prosecutions relating to such offences".

The judges also condemned data being retained without the safeguard of a prior review by a court or other independent administrative body.

They gave the Government and Parliament a deadline of March 2016 "to put matters right".

They warned that, if Parliament fails to act, they will disapply provisions contained in Section 1 which allow the retention of data without prior review, unless the data is held for "the prevention and detection of serious offences, or the conduct of criminal prosecutions".

Mr Davis, Conservative MP for Haltemprice and Howden, said: "The court has recognised what was clear to many last year - that the Government's hasty and ill-thought through legislation is fatally flawed.

He said the Government "will now have to rewrite the law to require judicial or independent approval before accessing innocent people's data".

Mr Watson, Labour MP for West Bromwich East, said: "The Government was warned that rushing through important security legislation would end up with botched law.

"Now the High Court has said they must come back to Parliament and do it properly."

But Mr Hayes said on behalf of the Government that the ruling could adversely affect fighting crimes such as stalking and harassment which might not come into the "serious crime" category.

Read more: Innocent people accused of paedophilia due to police data blunders

Mr Hayes said: "Communications data is not just crucial in the investigation of serious crime; it is also a fundamental part of investigating other crimes which still have a severe impact, such as stalking and harassment, as well as locating missing people, including vulnerable people who have threatened to commit suicide.

"The effect of this judgment would be that, in certain cases, communications data that could potentially save lives would only be available to the police and other law enforcement if a communications company had decided to retain it for commercial reasons.

"We believe that is wrong."

The MPs' successful challenge was backed by human rights pressure group Liberty.

Legal director James Welch said: "Liberty has long called for fundamental reform of our surveillance laws to ensure the public's rights are properly respected by our Government - the chorus of voices demanding change is now growing."

At a recent two-day hearing, Dinah Rose QC, for the MPs, argued that the legislation was rushed through in July last year "with enormous speed and hardly any scrutiny".

Ms Rose said both MPs appreciated that the authorities needed powers to fight crime and terrorism.

"Their concern is that this legislation doesn't contain the necessary minimum safeguards to protect against the risk of arbitrary, disproportionate or abusive retention and use of personal data, and for that reason it breaches the fundamental right to privacy."

Richard Drabble QC appeared on behalf of Mr Brice and Mr Lewis and argued that there were "fundamental legal reasons why the regime must fall".

A Government legal team, led by James Eadie QC, argued that provisions contained in the new data retention laws, combined with those already found in the Regulation of Investigatory Powers Act 2000 (Ripa), provided adequate safeguards and made the scheme compatible with EU law.

The judges disagreed.

Rachel Logan, Amnesty UK's legal programme director, said: "There's no doubt that the wheels have come off the Government's unlawful and unaccountable surveillance regime.

"Only last week Amnesty was informed that we too have been spied on, meaning we can't guarantee our contacts can communicate with us confidentially. Members of the public will want to know what on earth is going on."