A US judge has struck a blow against the National Security Agency's bulk collection of phone records, ruling that it breaches citizens' privacy to an "almost Orwellian" degree that is probably unconstitutional.
The scathing ruling on Monday by a federal judge in Washington was stayed pending appeal, but if upheld it could lead to the agency being barred from indiscriminately gathering metadata on millions of private calls. Metadata covers the time, duration and destination of calls but not their content.
While not a final judgment, the first such ruling put the administration on the back foot at the start of what will no doubt be a protracted series of legal challenges to the NSA's global surveillance network.
And it was seized upon by fugitive intelligence leaker Edward Snowden to support his case that he is a whistle-blower exposing official overreach rather than a traitor endangering national security.
US District Court Judge Richard Leon said: "I cannot imagine a more indiscriminate and arbitrary invasion than this systematic and hi-tech collection and retention of personal data on virtually every single citizen."
Leon argued that American founding father James Madison, one of the authors of the US Constitution, would be "aghast" at the government's "almost Orwellian" breach of citizens' rights to privacy.
He also took aim at US government claims that the scale of data-gathering was necessary to thwart terrorist plots.
"The government does not cite a single instance in which analysis of the NSA's bulk metadata collection actually stopped an imminent attack, or otherwise aided the government in achieving any objective that was time-sensitive in nature," Leon wrote.
The NSA refused to comment. The US Justice Department said it was examining the ruling.
"We believe the programme is constitutional as previous judges have found," a Justice Department spokesman said.
Two plaintiffs, Larry Klayman and Charles Strange, brought a case against Barack Obama's administration after Snowden revealed the vast scale of the NSA's digital dragnet.
Documents provided by Snowden to The Guardian revealed that the NSA had compelled US telecoms giant Verizon to provide agents with its clients' call metadata.
Subsequent leaks from Snowden's vast trove of classified documents suggest that other telephone and internet providers have also provided private details on both US and foreign clients.
Leon's ruling would bar the US government from continuing to siphon off metadata without judicial approval.
"In the months ahead other ... courts no doubt will wrestle to find the proper balance consistent with our constitutional system," he wrote.
Leon said the appeal process would take at least six months.
Snowden expressed satisfaction in a statement passed to The New York Times by his journalist ally Glenn Greenwald.
"Today, a secret programme authorised by a secret court was, when exposed to the light of day, found to violate Americans' rights. It is the first of many," Snowden said.