A National Security Agency surveillance program mistakenly violated the Constitution and misled the secret court overseeing the program, according to a redacted secret court opinion released Wednesday. The NSA mistakenly collected as many as between 40,000 and 50,000 wholly domestic emailed communications each year between 2008 and 2011 before the program was halted by a federal judge, a secret Foreign Intelligence Surveillance Court (FISC) opinion found.

Federal Judge John D. Bates, acting in his capacity as a judge on the FISC, wrote in the opinion that this was “the third instance in less than three years in which the government has disclosed a substantial misrepresentation regarding the scope of a major collection program.” The program was authorized to continue after the NSA made changes to the process for deleting inadvertently collected communications that take place between parties within the United States.

The violations, which were unintentional, represent a relatively small fraction of the communications monitored each year under the program, which numbered in the millions, according to the opinion. Nevertheless, they also represent violations of the law authorizing the surveillance, section 702 of the Patriot Act, which only sanctions monitoring of communications that are assumed to contain at least one point of contact originating abroad. In defending surveillance programs, legislators have often wrongly asserted that the NSA never collects Americans’ data.

“The FISA Court has noted that this collection violates the spirit of the law, but the government has failed to address this concern in the two years since this ruling was issued,” Oregon Democratic Sen. Ron Wyden said in a statement shortly after the opinion was released. “This ruling makes it clear that FISA Section 702, as written, is insufficient to adequately protect the civil liberties and privacy rights of law-abiding Americans and should be reformed.”

Administration officials have argued that the secret court provides a substantive check on NSA surveillance powers, pointing to the fact that the court has, as in this instance, occasionally rebuked the government for exceeding its powers. But civil libertarian groups focused on the disclosure that the court had been repeatedly misled. “These opinions indicate that the NSA misrepresented its activities to the court just as it misrepresented them to Congress and the public, and they provide further evidence that current oversight mechanisms are far too feeble,” Jameel Jaffer, the ACLU’s deputy legal director, said in a statement Wednesday.

The secret FISA court opinion declaring the NSA program unconstitutional was released in response to a lawsuit from the Electronic Frontier Foundation. The Obama administration later released several other secret foreign intelligence surveillance court opinions and administration documents related to government surveillance powers.

Vermont Democratic Sen. and judiciary committee chair Patrick Leahy said in a statement that the documents “underscore the need for increased oversight and stronger protections for Americans’ privacy.” Leahy also said he would schedule a judiciary hearing addressing the issue “in the coming weeks.”

Wyden and his Democratic Senate colleague Mark Udall of Colorado have twice attempted to pass laws banning inadvertent NSA collection and retention of Americans’ data under laws meant to target overseas communications, which they refer to as “backdoor searches.” Their proposals were consistently voted down by their colleagues in Congress, some of whom have since had changes of heart regarding the propriety of NSA surveillance.

If the release symbolizes partial payment on a promise made by the Obama administration to show more transparency on surveillance matters, it also highlights the bankruptcy of the administration’s initial resistance. The administration was content to release nothing when attempts to compel more disclosure about “secret law” being developed by foreign intelligence surveillance court opinions were being voted down in Congress. Administration officials publicly misled Congress about the nature of the programs. Only after leaks to the media regarding the scope of NSA surveillance has the administration felt pressure to disclose key information about what exactly the NSA is authorized to do.

The debate on whether or not the NSA surveillance programs are valuable will continue. But with the long-sought release of the secret court opinion, the Obama administration has largely conceded the debate over whether or not the public has a right to know what the NSA is legally allowed to do.