A surveillance program undertaken by America's National Security Agency has been ruled unlawful.
The program involved the collection of data from the private phone records of millions of Americans. It was exposed by whistleblower Edward Snowden, whose revelations were published by the Guardian newspaper.
Intelligence leaders who publicly defended the program have now been classed as liars following a ruling by the US Court of Appeals.
Snowden, who faces espionage charges in the United States, fled to Russia after blowing the whistle on the program in 2013. He is currently living in exile in Moscow.
After hearing about the court's ruling, Snowden said on Twitter: “I never imagined that I would live to see our courts condemn the NSA’s activities as unlawful and in the same ruling credit me for exposing them. And yet that day has arrived."
Senior US intelligence officials publicly denied that the NSA had ever wittingly gathered data from private phone records. Snowden's evidence, published online in 2013, proved these rebuttals to be false.
Defenders of the surveillance program argued that the ends justified the means, since the data it had illegally collected had been critical in uncovering domestic terrorism in the United States.
The information unlawfully gathered by the NSA led to the convictions of San Diego residents Basaaly Saeed Moalin, Ahmed Nasir Taalil Mohamud, Mohamed Mohamud, and Issa Doreh for providing aid to al-Shabab militants in Somalia.
Yesterday, the Court of Appeals for the Ninth Circuit said that the warrantless surveillance program had violated the Foreign Intelligence Surveillance Act.
Claims that the NSA had never knowingly collected data from private phone records were deemed by the court to be "inconsistent with the content of the classified records."
“Today’s ruling is a victory for our privacy rights,” the American Civil Liberties Union said in a statement.
"It makes plain that the NSA’s bulk collection of Americans’ phone records violated the Constitution.”
The ruling will not affect the convictions of Moalin and his fellow defendants as the court ruled that the illegal surveillance program had not tainted the evidence introduced at their trial.