The mutinous soldiers began laying down their arms after accepting an offer of amnesty from the government, but the uprising in the capital on Wednesday underscored the challenges facing new Prime Minister Sheikh Hasina.
Hasina won elections in December that returned the impoverished country to democracy after nearly two years of army-backed emergency rule, and the incident is a blow to her efforts to attract foreign investment.
"Nearly 50 people have been killed in sporadic fighting in the headquarters of the Bangladesh Rifles (BDR)," Mohammad Quamrul Islam, state minister for law and parliamentary affairs, told reporters.
Quamrul said all weapons would likely be surrendered in the coming hours.
Television channels showed troops handing over Chinese-made automatic rifles, bullets and grenades to Home Minister Sahara Khatun, who visited the headquarters after talks with the rebels.
No gunfire had been heard in the early hours of Thursday.
The mutiny erupted on Wednesday when at least five people were killed in shooting that broke out after enlisted men met officers to discuss a row over pay and the BDR command structure.
The government responded by sending troops to the BDR complex, and Home Minister Sahara Khatun held talks with the mutineers' leaders to defuse the situation, after which the rebels agreed to lay down their weapons.
Officials said 50 women and children were later evacuated from the BDR headquarters.
The shooting on Wednesday spilled onto the streets in Dhaka, killing three civilians and wounding several others, witnesses said earlier. Flames rose from the BDR complex and loud explosions were heard.
It was not immediately clear how many civilians were among those killed.
HASINA MEETS MUTINEERS
Bangladesh, home to more than 140 million people, has had several military coups since independence in 1971, but Wednesday's fighting did not appear to be politically motivated.
Hasina met some of the BDR mutineers on Wednesday in a bid to end the stand-off.
Government minister Jahangir Kabir Nanak said Hasina offered an amnesty to those involved during an hour-long meeting at her residence. One BDR officer said the rebels agreed to surrender their weapons after Hasina promised to meet the group's demands.
Around 2,000 BDR soldiers are usually stationed in the headquarters but it was not known how many joined the fighting. About 500 army troops and hundreds of police and other security forces were deployed to confront the mutineers.
The BDR, whose main duty is guarding the country's borders, is often called in to back up the army and police in meeting other defence and security requirements.
The mutiny broke out only a day after Hasina met senior BDR officers at an annual parade and told them her government would do its best to modernise the paramilitary forces.
Follow Emirates 24|7 on Google News.