Afghanistan's overcrowded prison system has become a "sanctuary and base" from which militants can plan attacks on international forces, as well as a key recruiting ground for new fighters, according to a report by the top US commander in the country.

Even detainees not previously linked with the Taliban or al-Qaida are at risk of being radicalised because a lack of personnel to interrogate them means many are kept at the Bagram air base facility for long periods without charge, said General Stanley McChrystal, who is in charge of US and Nato forces in the country.

The message came in a four-page supplement to a main report by McChrystal, warning that more international troops and revamped military tactics were needed to avoid possible defeat in the country.

"Unchecked, Taliban/al-Qaida leaders patiently co-ordinate and plan, unconcerned with interference from prison personnel or the military," he wrote.

Of the 14,500 prisoners in Afghanistan's "increasingly crowded" penal system, more than 2,500 were linked to the Taliban or al-Qaida, McChrystal's report said, adding: "There are more insurgents per square foot in corrections facilities than anywhere else in Afghanistan."

These radicals were recruiting inside the jails, he added: "Hardened, committed Islamists are indiscriminately mixed with petty criminals and sex offenders, and they are using the opportunity to radicalise and indoctrinate them."

Ultimately, the Afghan government should manage all prisons, including that at the US-run Bagram base, he said.

Currently, McChrystal noted, staff shortages meant there was little in the way of "productive interrogations" at Bagram. "As a result, hundreds are held without charge or without a defined way ahead. This allows the enemy to radicalise them far beyond their pre-capture orientation. The problem can no longer be ignored," he said.

Separately, in the 66-page report, McChrystal identified three main insurgent groups operating in Afghanistan, saying all of them had links to Pakistan.

They are the Quetta Shura Taliban, led by the former Taliban head Mullah Omar and based in the Pakistani city of Quetta; the Haqqani network, a group linked to al-Qaida and based in south-east Afghanistan; and the Hezb-e-Islami group of warlord Gulbuddin Hekmatyar, which has bases in three Afghan provinces "as well as Pakistan".