The U.S. Court of Appeals ruled that the NSA’s large-scale phone data collection was illegal.

A U.S. federal appeals court ruled Wednesday that the NSA’s massive collection of citizens’ phone records violated the law,media reported. The project collected records from mobile phone operators about who called whom, but it is now over. The panel ruled that large-scale information gathering went beyond what Congress allowed under basic surveillance laws, adding that the program could violate the U.S. Constitution.

The U.S. Court of Appeals ruled that the NSA's large-scale phone data collection was illegal.

In 2013, some journalists received leaked documents from former NASA contractor Edward Snowden, who first made them public. In addition, Snowden disclosed other projects in which the NSA and other agencies in cooperation countries used Internet trunks in the name of foreign surveillance. The NSA’s news infuriated privacy advocates and U.S. citizens who were ceded to the data. It also encourages U.S. technology companies to distance them from government spy agencies to convince customers that their data is secure.

Snowden tweeted Wednesday: “I never thought I’d live to see our court condemn the NSA’s activities as illegal and thank us for exposing them in the same ruling.” But the day has come. “

The U.S. Court of Appeals ruled that the NSA's large-scale phone data collection was illegal.

Congress is understood to have passed the USA Freedom Act in 2015, which requires the NSA to stop collecting information later that year.

Still, Patrick Toomey, a senior attorney with the American Civil Liberties Union (ACLU), called Wednesday’s ruling a victory for privacy. “The decision also recognizes that when the Government attempts to prosecute a person, it must inform them of the secret surveillance carried out to gather evidence. Given the proliferation of new spy tools used by governments today, this protection is crucial. “

The ruling is understood to have been made by Judge Marsha Berzon.