Innocent people interrogated for years on slimmest pretextsChildren, elderly and mentally ill among those wrongfully held172 prisoners remain, some with no prospect of trial or release

More than 700 leaked secret files on the Guantánamo detainees lay bare the inner workings of America's controversial prison camp in Cuba.

The US military dossiers, obtained by the New York Times and the Guardian, reveal how, alongside the so-called "worst of the worst", many prisoners were flown to the Guantánamo cages and held captive for years on the flimsiest grounds, or on the basis of lurid confessions extracted by maltreatment.

The 759 Guantánamo files, classified "secret", cover almost every inmate since the camp was opened in 2002. More than two years after President Obama ordered the closure of the prison, 172 are still held there.

The files depict a system often focused less on containing dangerous terrorists or enemy fighters, than on extracting intelligence. Among inmates who proved harmless were an 89-year-old Afghan villager, suffering from senile dementia, and a 14-year-old boy who had been an innocent kidnap victim.

The old man was transported to Cuba to interrogate him about "suspicious phone numbers" found in his compound. The 14-year-old was shipped out merely because of "his possible knowledge of Taliban...local leaders"

The documents also reveal:

• US authorities listed the main Pakistani intelligence service, the Inter-Services Intelligence Directorate (ISI), as a terrorist organisation alongside groups such as al-Qaida, Hamas, Hezbollah and Iranian intelligence.

Interrogators were told to regard links to any of these as an indication of terrorist or insurgent activity.

• Almost 100 of the inmates who passed through Guantánamo are listed by their captors as having had depressive or psychotic illnesses. Many went on hunger strike or attempted suicide.

• A number of British nationals and residents were held for years even though US authorities knew they were not Taliban or al-Qaida members. One Briton, Jamal al-Harith, was rendered to Guantánamo simply because he had been held in a Taliban prison and was thought to have knowledge of their interrogation techniques. The US military tried to hang on to another Briton, Binyam Mohamed, even after charges had been dropped and evidence emerged he had been tortured.

• US authorities relied heavily on information obtained from a small number of detainees under torture. They continued to maintain this testimony was reliable even after admitting that the prisoners who provided it had been mistreated.

The files also show that a large number of the detainees who have left Guantanamo were designated "high risk" by the camp authorities before their release or transfer to other countries.

The leaked files include guidance for US interrogators on how to decide whether to hold or release detainees, and how to spot al-Qaida cover stories. One warns interrogators: "Travel to Afghanistan for any reason after the terrorist attacks of 11 September 2001 is likely a total fabrication with the true intentions being to support Usama Bin Laden through direct hostilities against the US forces."

Another 17-page file, titled "GTMO matrix of threat indicators for enemy combatants", advises interrogators to look out for signs of terrorist activity ranging from links to a number of mosques around the world, including two in London, to ownership of a particular model of Casio watch.

"The Casio was known to be given to the students at al-Qaida bombmaking training courses in Afghanistan," it states.

The inclusion of association with the ISI as a "threat indicator" in this document is likely to pour fuel on the flames of Washington's already strained relationship with its key regional ally.A number of the detainee files also contain references, apparently based on intelligence reporting, to the ISI supporting, co-ordinating and protecting insurgents fighting coalition forces in Afghanistan, or even assisting al-Qaida.

Obama's inability to shut Guantánamo has been one of the White House's most internationally embarrassing policy failures. The files offer an insight into why the administration has been unable to transfer many of the 172 existing prisoners from the island prison where they remain outside the protection of the US courts or the prisoner-of-war provisions of the Geneva conventions.

The range of those still held captive includes detainees who have been admittedly tortured so badly they can never be successfully tried, informers who must be protected from reprisals, and a group of Chinese Muslims from the Uighur minority who have nowhere to go.

One of those officially admitted to have been so maltreated that it amounted to torture is prisoner No 63, Maad al-Qahtani. He was captured more than nine years ago, fleeing from the site of Osama bin Laden's last stand in the mountain caves of Tora Bora in 2001. The report says Qahtani, allegedly one of the "Dirty 30" who were Bin Laden's bodyguards, must not be released: "HIGH risk, as he is likely to pose a threat to the US, its interests and allies." The report's military authors admit his admissions were obtained by what they call "harsh interrogation techniques in the early stages of detention". But otherwise the files make little mention of the widely-condemned techniques that were employed to obtain "intelligence" and "confessions" from detainees such as waterboarding, sleep deprivation and prolonged exposure to cold and loud music.

The files also detail how many innocents or marginal figures swept up by the Guantánamo dragnet because US forces thought they might be of some intelligence value.

One man was transferred to the facility "because he was a mullah, who led prayers at Manu mosque in Kandahar province, Afghanistan … which placed him in a position to have special knowledge of the Taliban". US authorities eventually released him after more than a year's captivity, deciding he had no intelligence value.

Another prisoner was shipped to the base "because of his general knowledge of activities in the areas of Khowst and Kabul based as a result of his frequent travels through the region as a taxi driver".

The files also reveal that an al-Jazeera journalist was held at Guantánamo for six years, partly in order to be interrogated about the Arabic news network.

His dossier states that one of the reasons was "to provide information on … the al-Jazeera news network's training programme, telecommunications equipment, and newsgathering operations in Chechnya, Kosovo and Afghanistan, including the network's acquisition of a video of UBL [Osama bin Laden] and a subsequent interview with UBL".

The Guantánamo files are among hundreds of thousands of documents US soldier Bradley Manning is accused of having turned over to the WikiLeaks website more than a year ago.

The documents were obtained by the New York Times and shared with the Guardian and National Public Radio, which is publishing extracts, having redacted information which might identify informants.

A Pentagon spokesperson said: "Naturally we would prefer that no legitimately classified information be released into the public domain, as by definition it can be expected to cause damage to US national security. The situation with the Guantánamo detention facility is exceptionally complex and releasing any records will further complicate ongoing actions."

Later, US officials called the publication of the Guantánamo files "unfortunate" saying that they had been "obtained illegally by WikiLeaks". The Pentagon press secretary, Geoff Morrell, said: "These documents contain classified information about current and former GTMO detainees, and we strongly condemn the leaking of this sensitive information."

Morrell said that the Guantánamo Review Task Force, established in January 2009 by the Obama administration, considered the leaked files during its review of detainee information. He said: "In some cases, the Task Force came to the same conclusions as the DABs [files]. In other instances the Review Task Force came to different conclusions, based on updated or other available information.

"The assessments of the Guantánamo Review Task Force have not been compromised to Wikileaks. Thus, any given DAB illegally obtained and released by Wikileaks may or may not represent the current view of a given detainee," he added.