The National Security Agency illegally gathered as many as 56,000 emails and other electronic communications between Americans with no connection to terrorism as part of a collection program that was ruled unconstitutional by a secret spy court in 2011.

The Foreign Intelligence Surveillance Court rendered its decision in an 86-page opinion on Oct. 3, 2011. It was declassified Wednesday by U.S. intelligence officials, and Director of National Intelligence James Clapper authorized the release of the opinion.

“This is not an egregious overreaching by a greedy agency seeking to spy on Americans,” a senior intelligence official said. “This is a technological problem that resulted in an inadvertent collection of a relatively small number of U.S. personal communications.”

In the opinion, Chief Judge John Bates found that the government had “advised the court that the volume and nature of the information it has been collecting is fundamentally different from what the court had been led to believe.”

Bates said the court must rely on the government to say when it improperly spies on Americans, according to the opinion.

The information had been collected since at least 2006, Bates said in the opinion.Sen. Bob Corker of Tennessee, a ranking GOP member of the Senate Foreign Relations Committee, called for a hearing next month before the full Senate with NSA Director Keith Alexander.”This briefing should discuss the totality of NSA operations, including, but not limited to, those that have already been discussed publicly,” Corker wrote in a letter to President Barack Obama on Wednesday.

“Given the scope and scale of the disclosures to date and the significant likelihood of more to come, it is now all the more important that the administration come to Congress and provide a full accounting of the totality of these efforts,” Corker said.