Mutinous Bangladeshi border guards who stormed their headquarters in the capital and opened fire on their superior officers agreed to surrender Wednesday after the government said it would grant them amnesty.

The guards, angry over their pay, seized their headquarters and a nearby shopping mall, killing at least one person and trapping dozens of children in their school on the compound. The army was called in to quell the unrest.

Late Wednesday, officials from the Bangladesh Red Crescent said they had evacuated 15 injured people from the compound. "Some of them are badly wounded," said Syed Mokaddes Ahmed.

Media reports said up to five people were killed, though officials did not confirm this.

Ahmed said he had no information deaths, but his medics had not been allowed into all areas of the compound.

It was unclear when the agreed-to surrender would take place.

After the surrender agreement was reached at a meeting between Prime Minister Sheikh Hasina and representatives of the Bangladesh Rifles — the official name of the paramilitary border guards — the fighting subsided and the children were able to leave.

Reporters were kept away from the children and their parents after they were evacuated.

"The prime minister has announced amnesty for those involved in the trouble. We now hope to lay down our arms and go back to barracks," Mohammed Towhid, a spokesman for the mutineers, told reporters after the meeting.

Government spokesman Jahangir Kabir Nanak confirmed that the guards had been offered an amnesty.

For more than four hours Wednesday afternoon, intermittent gunshots rang out at the headquarters, while smoke billowed from the compound.

A rickshaw driver, who was shot outside the compound, died at state-run Dhaka Medical College Hospital, doctors said. Three bystanders and one border guard were being treated at the hospital for wounds, doctors said on condition of anonymity, sighting protocol.

Guards reached inside the compound by phone said they were upset that their officers had not raised their demands for equal pay and working conditions as army soldiers when Hasina visited the headquarters the day before.

It was not immediately clear if the government would agree to all of their demands, that included more food rations and a chance to participate in high-paying U.N. peacekeeping missions.

Bangladesh, an impoverished nation of 150 million people, has a history of military coups and political assassinations. Two of the South Asian nation's presidents have been slain in military takeovers, and there have been 19 failed coup attempts since the country gained independence from Pakistan in 1971.

During the siege, hundreds of anxious relatives of the students gathered near the compound, waiting for news. Amid the confusion it was not immediately clear if the students were being held hostage.

"I'm so worried about my son," said Monira Khatoon, mother of a 10-year-old boy stranded inside the school. "I pray no harm will be done."

Television footage recorded from nearby rooftops showed some border guards with rifles moving around inside the compound. Army soldiers had there guns trained on the four gates leading to the compound.

Ilias Ahmed, who lives in apartment building just outside the border guards compound, said he saw vehicles burning inside.