Military presence on the streets of Dhaka
Bangladeshi border guards have ended their two-day mutiny, surrendering their weapons and freeing all hostages.
The statement came after tanks surrounded the guards' barracks and Prime Minister Sheikh Hasina threatened tough action unless they surrendered.
It is unclear if mutineers at bases outside Dhaka have also surrendered.
Twenty people have died and dozens injured in the stand-off which began on Wednesday with rank-and-file guards mutinying over pay and conditions.
"All the rebel troops have surrendered with their arms and the process has been completed," Sheikh Hasina's spokesman Abul Kalam Azad said of the Dhaka mutineers.
He urged rebel troops from the Bangladesh Rifles (BDR) outside the capital to lay down their arms as well.
The bodies of nine army officers have been recovered from the BDR complex, apparently killed by the mutineers.
The guards' chief Maj Gen Shakil Ahmed is reported to be among those killed, but there is no official confirmation.
Military officials said they are searching the complex for more than 100 missing officers. Some are thought to have hidden in manholes.
Seven BDR troopers were also killed in the clashes, along with four civilians, including one boy.
Army tanks had been positioned around the border force's headquarters in Dhaka.
The average BDR trooper earns about $70 (£49) a month, equivalent to the pay of a low-ranking government clerk. Their senior officers, in contrast, are relatively well-paid army officers.
As the tense standoff continued outside, a delegation led by the Home Minister Shahara Khatun bravely negotiated an end to the crisis, our correspondent Mark Dummett reports from Dhaka.
First they persuaded the mutineers to release their remaining hostages. About 150 people, mainly women and children, but also 20 BDR officers were freed.
Then they talked the mutineers into laying down their guns. Some tried to escape and were arrested, but the vast majority, who officials say could number up to 7,000 gave up peacefully.
Earlier on Thursday, in a televised address to the nation, the prime minister called on the border guards BDR to abandon what she called their "suicidal action".
"Lay down your guns immediately and go back to barracks," she said.
Soldiers were sent to the barracks seized by mutinous border guards
"Do not force me to take tough actions or push my patience," she said.
The government offered the border guards a general amnesty, and the prime minister promised to look into the soldiers' grievances.
The crisis began on Wednesday at about 0930 local time (0330 GMT) with heavy fighting. An army helicopter patrolling above the barracks was shot at and mortar rounds were also fired.
The situation was unclear at bases outside of Dhaka, but there were no reports of firing late on Thursday, the BBC Bengali Service said.
Earlier in the day, border guards in at least 12 different towns and cities were reported to have seized control of their barracks.
In at least two places, one of them the main port city of Chittagong, mutineers have released hostages they were holding.
The situation was unclear at Feni, on the eastern border with India, in Rajshahi in the north west, Sylhet in the north, Cox's Bazaar, and Khulna in the south.
Mobile phone service was temporarily suspended across the country on Thursday in a bid to stop the rebellion spreading.
The BDR has nearly 70,000 men stationed at 42 camps across the country, including 40,000 on the borders.