Detectives raided a Jamayetul Mujahideen Bangladesh (JMB) hideout in the capital around midnight following a tip-off, triggering a shootout with police.
"Two militants were wounded as police fired back after the militants hurled a grenade and started shooting indiscriminately. They were declared dead after they were brought to Dhaka Medical College Hospital," a police statement said.
One of the commanders named as Kamal, alias Hiron, was a suspect in the attack on Dhaka's packed main Shia shrine in October 2015 that left two dead and dozens injured.
Deputy commissioner Sanwar Hossain said commanders Abdullah al Noman and Kamal, who used one name, were both prime suspects in the murder of a police constable at a check-post in November. Three JMB militants were also arrested during the overnight raid, police said.
Police have stepped up a crackdown on local religious extremists after the Muslim-majority country was left reeling from an upsurge in deadly violence last year blamed on religious extremists. The government rejects the Islamic State's claims of responsibility for many of the attacks, including the shooting murders of two foreigners.
Prime Minister Sheikh Hasina's secular government insists the militants have no presence in the country. It instead accuses the JMB and other local militant groups as well as the religious-allied political opposition of trying to destabilise the country.
The Sunni-majority country has been plagued by unrest in the last three years, and experts warn that a long-running political crisis has radicalised opponents of the government.
In November, police shot and killed another JMB commander, called "Albany", accused of being the main suspect in the Shia shrine blast. Experts fear the JMB is attempting to regroup, years after its top leaders were executed over a 2005 nationwide bombing campaign by the group in a failed effort to introduce Sharia law.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ