Updated

Seventeen inmates were rushed to the hospital Tuesday after rebellious prisoners at Kabul's main jail agreed to halt two days of rioting and allow the injured to be taken away for treatment.

The inmates, including Taliban and Al Qaeda detainees, still control the main wings of the sprawling Policharki prison, said Gen. Zamarai, the Afghan army commander in charge of security at the jail. But they have stopped trying to break out from their cell blocks into the surrounding grounds where police and soldiers have taken up positions, he said, adding there had been no violence since late Monday.

"Everything is completely calm," said Zamarai, who uses only one name. "I was even talking and joking with some of the prisoners this morning."

Authorities restored supplies of water, electricity and food to the prisoners after progress was made in negotiations. A tanker truck carrying water and another vehicle loaded with potatoes and rice were seen driving into the compound on the outskirts of the capital, Kabul, Tuesday.

The supplies were withheld late Sunday from the roughly 2,000 prisoners, including women and their children, even though the violence was blamed only on some 350 Taliban and Al Qaeda detainees.

Zamarai said 17 of the wounded were taken to a hospital in Kabul for treatment. Officials have said a total of 38 people have been hurt. Four people were killed, including a Pakistani and a Tajik, whose identities were not known.

Sibghatullah Mujaddedi, the chief government negotiator, was expected to return to the prison later Tuesday to resume talks with the prisoners, who have made a range of demands, including a general amnesty for an unspecified number of inmates.

Authorities said no deadline has been set for a deal to be reached.

The prisoners are believed to be armed with small knives and clubs fashioned from wrecked furniture, but do not have guns.

Violence erupted late Saturday after prisoners refused to put on new uniforms, delivered in response to a breakout last month by seven Taliban prisoners who had disguised themselves as visitors.

Outside the jail, dozens of relatives of inmates pleaded with guards for news. Some women beat the ground as their children wailed, fearful that their loved ones may be among those killed.

"Oh, my son, are you alive?" Zubaida Gul, 60, cried at the feet of some guards. "Your family needs you."

Another woman said she was afraid for her brother, Abdul Baseer, a convicted murderer, because conditions in the prison were terrible.

"This is not a jail, it's a cemetery," said the woman, who gave her name only as Mariam. "No one has any rights once they've gone inside. I doubt I will ever see him again."

She said the international community has an obligation to improve conditions at the prison.

Policharki was built in the 1970s and has earned notoriety for its harsh and crowded conditions.

Some of its blocks are being renovated ahead of the expected arrival of some 110 Afghan terror suspects later this year from the U.S. military prison at Guantanamo Bay, Cuba, but there has been little work on the rest of the facility.