High Court judges ruled that the Data Retention and Investigatory Powers Act (#DRIP) was inconsistent with the European convention on human rights.
The judges ruled that the law should be "disapplied" but that this didn't have to happen until March 2016, giving Parliament time to pass new (likely more horrific) legislation.
DRIP allowed the Secretary of State to order telcos, ISPs and online services to retain all user data and hand it over to the government. It did not exclude traditionally confidential information, notably privileged lawyer-client communications and communications between journalists and confidential sources.
The challenge to DRIP was brought by two MPs: Labour's Tom Watson and the former Tory shadow home secretary David Davis.
One interesting wrinkle in the judges' ruling was that the legislation was found to be incompatible with the human rights convention in part because there weren't adequate safeguards to prevent retained data from leaving the UK. The Trans Pacific Partnership and its EU/US equivalent, TTIP, both ban states from passing laws limiting where retained data must be stored — to stop, for example, Germany from ordering German companies to keep German users' data in Germany, away from the NSA's system of secret sneak-and-peek warrants.
Watson, a former defence minister, said after the ruling: "It's a year to the day since Dripa received royal assent. Good governance is about allowing the legislature the room to make law. In this case it didn't happen. Good opposition is about holding governments to account and that didn't happen either.
"So we find ourselves in a position where the courts have had to say to parliament go back and start again. In his final speech in parliament on this bill last year, David Davis warned that this legislation would be junk in a year and it is."
Davis, a former Foreign Office security minister, said: "What this means is that access by the police and other agencies to everyone's data is too easy. It can can range from a politician giving permission [to intercept communications] to anyone in the next office. That's against the law and it's not either in the interests of privacy or security.
"The government gave parliament one day to pass this legislation. This court has given the government nine months to sort it out.
"It's the right judgment. It's a measured judgment. It gives no risk to security because the government has plenty of time to sort it out.
"What this reflects is the emerging consensus in the last few weeks that proper judicial approval [of intercepting communications] is needed."
High court rules data retention and surveillance legislation unlawful [Owen Bowcott/Guardian]
(Image: Dripping Maple Goodness,