hand phone
© Getty Images/thinkstock
A federal appeals court ruled Wednesday that the National Security Agency (NSA) surveillance program that collected data on Americans' telephone calls was illegal and possibly unconstitutional.

A three-judge panel on the 9th Circuit Court of Appeals ruled that the program, which was revealed by whistleblower Edward Snowden and officially ended in 2015, violated U.S. surveillance laws and potentially the Fourth Amendment of the Constitution.

Despite their conclusion about the surveillance program, the judges upheld the convictions of four Somali immigrants who brought a legal challenge against it on appeal. Wednesday's ruling came seven years after the four were convicted in 2013 of sending money to the terrorist group al-Shabaab.

Snowden, who was cited repeatedly in the court's decision, revealed the surveillance program's existence just months after their trial in 2013. Under the program, the NSA collects and analyzes bulk data provided by telecommunications companies.

That information included details on Americans' phone calls — such as the numbers they were calling and the duration of calls — but not the content. Congress passed a law ending the program in 2015.

Patrick Toomey, a senior staff attorney with the American Civil Liberties Union, said he was disappointed that the court didn't find that the illegal surveillance affected the four defendants' convictions, but applauded the ruling for condemning bulk collection program:
"Today's ruling is a victory for our privacy rights. The ruling makes plain that the NSA's bulk collection of Americans' phone records violated the Constitution. The decision also recognizes that when the government seeks to prosecute a person, it must give notice of the secret surveillance it used to gather its evidence. This protection is a vital one given the proliferation of novel spying tools the government uses today."
The Justice Department declined to comment.

The metadata collection program was created and approved by the secretive Foreign Intelligence Surveillance Court after the passage of the Patriot Act in the wake of the 9/11 terrorist attacks.

The court's decision Wednesday, which was written by Judge Marsha Berzon, a Clinton appointee, ruled that the bulk collection of phone records violated the requirement that agencies seek a court order when obtaining information relevant to an investigation from a private business.

The court stopped short of ruling the metadata program unconstitutional, saying it was irrelevant to the defendants' convictions.