Declassified court documents show a NSA surveillance system illegally gathered up to 56,000 personal emails by Americans with no links to terror suspects annually.
Officials revealed that a judge in the Foreign Intelligence Surveillance Court ruled the programme illegal in 2011.
The US government faces mounting criticism over its surveillance operations after the leaks of whistle-blower Edward Snowden.
The court, whose rulings are normally kept secret, said the NSA may have violated US law for collecting as many as 56,000 emails on an annual basis between 2008 and 2011.
But intelligence officials speaking to reporters anonymously say the scooping of emails was unintentional, blaming it on a technological problem.
The NSA was unable to separate out emails between Americans with no direct connection to terrorism, so the agency was collecting tens of thousands of “wholly domestic communications” every year, the court documents said.
NSA may have violated US law for collecting as many as 56,000 emails on an annual basis between 2008 and 2011
In the ruling, Judge John Bates criticized the NSA over the breach of privacy, marking it as “the third instance in less than three years in which the government has disclosed a substantial misrepresentation regarding the scope of a major collection programme”.
The court found that the data gathering violated the Fourth Amendment of the US Constitution, prohibiting “unreasonable searches and seizures”.
The court’s opinions, which are usually kept secret, were revealed by the government in response to a Freedom of Information request.
Government officials said that the court rulings had been declassified to show that eavesdropping programmes at fault had been found and fixed, highlighting its oversight measures.
The scope of the NSA’s massive surveillance programme, which sweeps up internet traffic and phone records, was exposed in June in leaks to media by former NSA contractor Edward Snowden.
Earlier this month, President Barack Obama promised to be more transparent about US spying programmes, with “appropriate reforms” to guarantee greater oversight.
Germany has decided to cancel a Cold War-era pact with the US and the UK in response to revelations about electronic surveillance operations.
Details of snooping programmes involving the transatlantic allies have been leaked to the media by Edward Snowden.
The revelations have sparked widespread outrage in Germany, where elections are due next month.
The agreement dates from 1968-1969, and its cancellation is largely symbolic.
Germany has decided to cancel a Cold War-era pact with the US and the UK in response to revelations about electronic surveillance operations
German Foreign Minister Guido Westerwelle said in a statement: “The cancellation of the administrative agreements, which we have pushed for in recent weeks, is a necessary and proper consequence of the recent debate about protecting personal privacy.”
Germans’ experience of mass surveillance under the Communist and Nazi dictatorships makes them particularly sensitive to perceived infringements of personal privacy, and the country has strong data protection laws.
The agreement cancelled on Friday gave the Western countries which had troops stationed in West Germany – the US, the UK and France – the right to request surveillance operations to protect those forces.
A German official told the Associated Press news agency that the agreement had not been invoked since the end of the Cold War, and admitted that the decision would have no impact on current intelligence co-operation.
A spokesperson for the UK’s Foreign Office told reporters that the agreement had not been in use since 1990.
Henning Riecke of the German Council on Foreign Relations told AP that the German government needed to do something to demonstrate at home that it was taking the issue seriously.
“Ending an agreement made in the pre-internet age gives the Germans a chance to show they’re doing something, and at the same time the Americans know it’s not going to hurt them.
“Given the good relations between the intelligence agencies, they’ll get the information they need anyway,” he said.