The US held hundreds of inmates who were either totally innocent or low-risk for years and released dozens of high-risk Guantanamo inmates, according to newly leaked classified files.

The new leaks reveal that inmates were held without trial on the basis of often seriously flawed information, such as from mentally ill or otherwise unreliable co-detainees or statements from suspects who had been abused or tortured, The New York Times reported.

The New York Times was among a group of US and European media outlets that also included The Daily Telegraph, NPR, El Pais, Le Monde, Der Spiegel and La Repubblica to receive 779 documents from the whistle-blowing website WikiLeaks.

At least 150 Guantanamo detainees were innocent Afghans or Pakistanis, including drivers, farmers and chefs, according to the Telegraph.

They were rounded up as part of frantic intelligence-gathering in war zones and then detained at the US naval base in southeastern Cuba for years due to mistaken identity or simply for being at the wrong place at the wrong time.

It said that overall, US military analysts considered only 220 of all the suspects in the George W Bush-era ‘war on terror’ ever detained at Guantanamo to be dangerous extremists.

Another 380 were deemed to be low-ranking foot soldiers who traveled to Afghanistan or were part of the Taliban, the Telegraph reported.

In dozens of cases, senior US commanders were said to have concluded that there was ‘no reason recorded for transfer’ to Guantanamo Bay.

Prison officials were aware in at least two cases that they were holding innocent men behind bars and even acknowledged that in writing in their prison files, and yet it took months for them to be returned to their home countries, according to the public radio station NPR.

Meanwhile, about a third of the 600-some men who have been transferred to third countries were branded ‘high-risk’ before being released or handed to other governments, The New York Times noted.

Of the 172 prisoners who remain at Guantanamo, 130 have been rated as posing a ‘high-risk' threat.

US President Barack Obama's administration, which has struggled to shutter Guantanamo, denounced the ‘unfortunate’ release of the classified documents, part of a massive cache of secret memos leaked to WikiLeaks last year.

In a statement, the government said the Obama and Bush administrations had ‘made every effort to act with the utmost care and diligence in transferring detainees from Guantanamo.’