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.
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.
myqdL2nvZ_kAt least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…