The clashes at Policharki Prison restarted after negotiations to end the rebellion broke down, said Abdul Halik, a police commander in the prison. He said authorities had urged the prisoners to move into a different wing of the jail but the inmates refused.
"The prisoners have tried to break down the door to their block and the police opened fire," Halik said.
He said the prisoners then retreated inside the building. Even if the rioting inmates had managed to flee their block, they would still have been inside the prison compound and a tall wall would have prevented them from escaping outside.
Police have blamed about 350 Taliban and al Qaeda detainees for inciting the riot.
A purported spokesman for the prisoners, who identified himself only by the name Maqsodi, told The Associated Press by mobile phone from inside the jail that the prisoners refused to move because living conditions were no better in the new block.
The prison was built in the 1970s and is notorious for harsh and crowded conditions.
The rioting erupted late Saturday after prisoners refused to put on new uniforms, delivered in response to a breakout last month by seven Taliban inmates who had disguised themselves as visitors.
On Monday, a government negotiator said four inmates had died and 38 were wounded in the standoff. But that toll did not include the casualties reported by police on Tuesday.
Seventeen seriously wounded prisoners were rushed to a hospital earlier Tuesday along with the bodies of four of the dead after the prisoners agreed to halt the violence temporarily, said Gen. Zamarai, the Afghan army commander in charge of security at the jail.