Hundreds of police and soldiers sealed off and surrounded a block of the Pul-i-charki prison on Kabul's outskirts after the riot erupted late on Saturday, apparently from a wing holding Taliban and al-Qaida prisoners.
There were reports of more than 30 casualties, including deaths, but a security official inside the prison said on Monday that the number was impossible to confirm as authorities had no access to the block, which houses about 1350 inmates.
Police, themselves surrounded by a cordon of soldiers, had closed the gates to the compound and were reluctant to enter as the chaos raged, the security official said, asking not to be identified.
Inmates, some armed with weapons made from steel bedposts and other furniture, tossed flaming bedding and wooden furniture out of the windows on Sunday, the official said by telephone from inside the jail.
Some were shouting "Death to [Afghan President Hamid] Karzai", "Death to [US President George] Bush" and "Death to America," he said.
The block consisted of a section for political prisoners, one for criminals and another for women. The rioters had broken the barriers between the sections and officials expressed concern that some of the women may have been raped.
The uprising appeared to have started in the political section, which contained about 300 suspected Taliban and al-Qaida fighters, and spread to the criminal wing, said Afghan Independent Human Rights Commission spokesman Nader Nadeery.
Some reports said the unrest may have been sparked by resistance to new prison uniforms, which would reportedly distinguish between political and criminal prisoners. Others said the riot was a Taliban escape attempt.
The prisoners appeared to have no single aim and there were conflicting demands coming from inside the building, the prison official said.
The prison houses self-styled US
vigilante Jonathan Idema (L)
Nadeery, whose organisation was called in to try to negotiate with the rioters, said they "are not agreeing on anything ... they just want to be released."
Gang leader Timur Shah, convicted of kidnapping an Italian aid worker last year and sentenced to death for murder, was also involved in provoking the situation, he said.
The massive and rundown jail, built in the 1970s, is notorious for the detention and torture of thousands of people during the communist rule of the 1980s.
Seven low- to mid-ranking Taliban prisoners escaped from it a month ago, allegedly with help from prison wardens.
Five guards and four inmates with suspected links to al-Qaida and the Taliban died during a stand-off there in December 2004. Three of the dead were Pakistanis and one was an Iraqi.
The Taliban have been battling Karzai's government since they were toppled from power in a US-led invasion in 2001 for refusing to hand over al-Qaida leader Osama bin Laden.
The prison also houses self-styled US vigilante Jonathan ''Jack'' Idema and two others who were convicted in September 2004 of running a private jail and torturing Afghans they suspected of links with the Taliban and al-Qaida. They have their own, separate block.