The bulk collection of telephone data by the US National Security Agency, as highlighted by whistleblower Edward Snowden, has been ruled illegal under federal law by the US court of appeal.
Documents leaked by Snowden revealed a culture of industrial-scale collection of telephone metadata, including information like who called whom, when, and for how long. The leaks were part of a much larger exposé which claimed the NSA and British cousin, GCHQ, spied on the private digital communications of civilians, whether they were considered a threat to national security or not.
The landmark ruling by three federal judges at the Court of Appeals for the Second Circuit, paves the way for a full legal challenge against the NSA and its actions, which were first brought to light almost two years ago. It also comes as Congress is drafting reforms to the government's surveillance authorities, including potential changes which would effectively end bulk data collection.
The appeals court said a lower court's 2013 ruling was wrong to say that the Patriot Act, designed to defend the US against acts of terrorism by intercepting communications, prevented a court from reviewing the NSA's data collection programmes.
The NSA had been using section 215 of the Patriots Act, put into place in by George W. Bush in the wake of the September 11 attacks in 2001, to gather up phone records of US citizens en masse. Section 215 expires in its current state on 1 June, by which time Congress will have to move to limit its reach.
The agency's actions "exceeds the scope of what Congress has authorised," Judge Gerard Lynch wrote in his decision.
"We conclude that to allow the government to collect phone records only because they may become relevant to a possible authorised investigation in the future fails even the permissive 'relevance' test," the appeals court ruled, adding: "We agree with appellants that the government's argument is 'irreconcilable with the statute's plain text'."
The ruling comes in response to a lawsuit by the American Civil Liberties Union, which argued the mass surveillance programmes outed by Snowden violated the constitutional privacy rights of Americans. Because he deemed the NSA's programmes were never appropriately authorised by law, Lynch did not rule specifically on the privacy implications caused by them.
Republican presidential candidate Senator Rand Paul tweeted his support of the ruling: "The phone records of law abiding citizens are none of the NSA's business! Pleased with the ruling this morning."