Image: NSA

The U.S. government on Wednesday released a secret court ruling that found some surveillance conducted by the National Security Agency illegal.

The Electronic Frontier Foundation (EFF) heralded the release of the 86-page opinion by the Foreign Intelligence Surveillance Court (FISC), set up under its namesake 1978 act, as a "victory."

The Director for National Intelligence James Clapper announced in a statement, following the release of the court opinion, the establishment of a review group which will report on the U.S.' surveillance capabilities by mid-December.

The group will assess "whether the U.S. employs its technical collection capabilities in a manner that optimally protects our national security [...] while appropriately accounting for other policy considerations, such as the risk of unauthorized disclosure and our need to maintain the public trust."

Read this PRISM: Here's how the NSA wiretapped the Internet The National Security Agency's "PRISM" program is able to collect, in realtime, intelligence not limited to social networks and email accounts. But the seven tech companies accused of opening 'back doors' to the spy agency could well be proven innocent. Read More

It comes after weeks of leaks releases by a number of U.K. and U.S. newspapers and outlets acquired by former NSA contractor Edward Snowden, who blew the whistle on a number of U.S. government surveillance programs in June.

The court document, dated October 3, 2011, found some of the NSA's collections to be in breach of the Fourth Amendment, which gives U.S. persons protections against unreasonable searches and seizures.

It's not the first time the opinion has been released. It was published in January, but the document was so heavily redacted it was impossible to read, bar a single sentence that offered nothing of value.

In the readable (albeit still heavily redacted) opinion, the court said it was "troubled" that the government's revelations over the NSA's acquisition of Internet traffic was the third time in less than three years in which the government disclosed a "substantial misrepresentation" of the scope of its collection programs.

The now-discontinued "upstream" program diverted large quantities of international data from fiber cables running in and out of the U.S. into a data center, where it could be stored and analyzed.

Investigative reporting by ZDNet in June first detailed how fiber and telecoms companies were ordered under law to allow vast amounts of data belonging to U.S. citizens and foreign nationals to be wiretapped.

Realistically, the NSA was unable to filter out the communications of Americans speaking to other Americans.

According to NSA estimates, as much as 56,000 "wholly domestic communications" may have been acquired, and are being acquired, by the government agency per year.

NSA acquires more than 250 million Internet communications each year under Section 702 of FISA, the document states. Most are obtained from Internet providers. The court opinion also says that the NSA's upstream program constitutes only approximately 9 percent of the total Internet communications being acquired under Section 702.

Earlier on Wednesday, a report by The Wall Street Journal claimed the NSA could reach as much as 75 percent of all U.S. Internet traffic .

"The exceptions to minimization requirements mean information gathered on Americans could be used in ordinary criminal investigations, according to rules approved by the FISA court," the Journal wrote.

One month after the FISC ruled the upstream program unconstitutional, the NSA adjusted its collection process to filter out wholly American traffic away from international traffic. It also purged any domestic traffic that it received.

"Contrary to the government's repeated assurances, [the] NSA had been routinely running [search] queries of the metadata using querying terms that did not meet the required standard for querying," the document said.

The court concluded, it read, that this requirement had been "so frequently and systematically violated that it can fairly be said that this critical element of the overall [...] regime has never functioned effectively."