A National Security Agency surveillance system illegally gathered up to 56,000 personal emails by Americans annually, declassified court documents show, reports BBC. The communications were between people with no links to terror suspects. The US government faces mounting criticism over its surveillance operations after the leaks of US 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 criticised 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 program". 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 programs at fault had been found and fixed, highlighting its oversight measures. The scope of the NSA's massive surveillance program, 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 programs, with "appropriate reforms" to guarantee greater oversight.