Afghan officials say authorities have regained control of Kabul's main high-security prison after four days of rioting that left at least five people dead and more than 30 injured.

The deputy justice minister, Mohammed Qasim Hashimzai, says 1,300 prisoners, including several hundred Taleban and al-Qaida inmates who prison officials say instigated the revolt, have been moved to other prison blocks.

He says the criminal inmates ended resistance first, followed by the others.

The violence began late Saturday after prisoners were issued uniforms to prevent a repeat of last month's escape by seven Taleban inmates disguised as civilians.

The deputy justice minister said the moved prisoners include three Americans and they are safe. One of the three, Edward Caraballo, said by mobile phone Tuesday that Taleban inmates threatened to kill him. The three Americans are in Pul-e-Charkhi prison after being convicted of running a private jail in Kabul as part of a freelance hunt for terrorists.

Some information for this report was provided by AFP, AP and Reuters.