Canadian Omar Khadr was 15 when captured and is still there after nearly nine years, while men as old as 89 have been held

The Guantánamo files reveal the often fragile physical and mental condition of Guantánamo's oldest and youngest residents, who have included an 89-year-old man and boys as young as 14.

In 2002 Guantánamo prisoners were described as "the worst of a very bad lot" by Dick Cheney, US vice-president. "They are very dangerous. They are devoted to killing millions of Americans, innocent Americans, if they can, and they are perfectly prepared to die in the effort."

But the internal files on some prisoners paint a very different picture. A 2002 assessment of Guantánamo's oldest prisoner, Mohammed Sadiq, who was then 89, revealed dementia, depression and sickness. "His current medical issues include major depressive disorder, senile dementia and osteoarthritis, for which he receives prescribed treatment." The Afghan national was also being assessed for prostate cancer.

Sadiq's records state he was detained after suspicious documents allegedly belonging to his son were found in a raid on his house. He was flown to Guantánamo four months later. Interrogators concluded within six weeks of his arrival that Sadiq was "not affiliated with al-Qaida", not a Taliban leader and possessed "no further intelligence value to the United States". He was repatriated to Afghanistan after a further four months.

Another elderly and unsuitable prisoner was found to have senile dementia on arrival at Guantánamo. Haji Faiz Mohammed, then 70, was flown to the base in 2002 after being swept up in a raid by US troops in Afghanistan. "There is no reason on the record for detainee being transferred to Guantánamo Bay detention facility," his assessment says.

The files shed light on the way mere children were shipped to the cages in Cuba. Naqib Ullah, who was about 14 when captured in 2003, spent a year interned at Guantánamo.

Naqib's file reveals he had been abducted by armed men as they passed through his village, mistreated and conscripted to fight for the Taliban. He told his captors that as US forces approached their camp most fighters fled the base, leaving a few behind to fight. Naqib was found holding a gun, the file states, but the weapon had not been fired.

US interrogators accepted Naqib's version of events. "Detainee was a kidnap victim and a forced conscript of a local warring tribe, affiliated with the Taliban. Though the detainee may still have some remaining intelligence, it's been assessed that that information does not outweigh the necessity to remove this juvenile from his current environment and afford him an opportunity to 'grow out' of the radical extremism he has been subject to." Naqib Ullah was flown home in 2004.

Another young inmate fared less well. Omar Khadr, aged 15 at the time, is the son of an alleged al-Qaida leader in Canada. He killed a US soldier by throwing a grenade at him during a battle at a suspected al-Qaida base in Afghanistan. Khadr has spent nearly nine years in Cuba as a result.

His 2004 assessment stresses the intelligence value of his family connections. "Based on the detainee's folder, the knowledgeability brief and subsequent interrogations by JTF Guantánamo, the detainee is of high intelligence value to the United States.

"Detainee continues to provide valuable information on his father's associates, and on non-governmental organisations that he worked with in supporting al-Qaida, as well as other major facilitators of interest to the US."

Khadr pleaded guilty to war crimes at a military tribunal in October 2010, becoming the first minor to face such a conviction since the second world war. The plea deal is due to see him transferred to Canada later this year, to serve the remainder of an agreed eight-year sentence.