The High Court has ruled that the "emergency" DRIPA surveillance legislation rushed through Parliament last year is unlawful.

A challenge brought by MPs David Davis (Con) and Tom Watson (Lab), following the rushed passage of the Data Retention and Investigatory Powers Act 2014 (DRIPA) – which was sped through Parliament under "emergency" pretexts – has been upheld by the High Court.

The court found that sections 1 and 2 of DRIPA are incompatible with the British public's right to respect for private life and communications and to protection of personal data under Articles 7 and 8 of the EU Charter of Fundamental Rights.

The landmark judgment was delivered on the anniversary of DRIPA receiving Royal Assent on 17 July 2014.

Davis criticised the branding of DRIPA as "emergency" legislation during the debate, noting it was necessitated by a ruling by the Court of Justice of the EU which was delivered three months previously.

During that time, Davis alleged, the Coalition government had been conflicted about the Conservative members' wishes to advance surveillance powers and their Liberal Democrat partners who wanted to add additional safeguards for the public.

Liberty, which fought the case alongside the MPs, noted the High Court judgment and explained that sections 1 and 2 of DRIPA were found unlawful on the basis that:

they fail to provide clear and precise rules to ensure data is only accessed for the purpose of preventing and detecting serious offences , or for conducting criminal prosecutions relating to such offences.

, or for conducting criminal prosecutions relating to such offences. access to data is not authorised by a court or independent body, whose decision could limit access to and use of the data to what is strictly necessary. The ruling observes that: "The need for that approval to be by a judge or official wholly independent of the force or body making the application should not, provided the person responsible is properly trained or experienced, be particularly cumbersome."

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."

"They will now have to rewrite the law to require judicial or independent approval before accessing innocent people's data, reflecting the new consensus amongst experts in the Anderson and RUSI reports," added Davis.

Watson, Labour MP for West Bromwich East, added: "The Government gave MPs one day to discuss the legislation which was wrongly represented as respectful of people's right to privacy: it has until March 2016 to make sure that the law is re-written."

"There must be independent oversight of the government's data-collection powers and there must be a proper framework and rules on the use and access of citizens' communications data," Watson stated. ®