Bangladesh security forces killed four militants, including the man believed responsible for the attack on a café in Dhaka last month in which 22 people, mostly foreigners, were killed.
The militants were cornered in an early morning raid on their hideout in Naraynganj, on the outskirts of the capital, and were killed after refusing to surrender, a police spokesman said.
Bangladesh-born Canadian citizen Tamim Ahmed Chowdhury, the alleged mastermind of the attack on the cafe, was among those killed.
The so-called Islamic State had claimed responsibility for the cafe attack and, while the government has dismissed the claim, security experts say the scale and sophistication of the assault suggested links to group.
Analysts say Islamic State in April identified Chowdhury as its national commander.
The suspected Islamist militants singled out non-Muslims and foreigners in the 1 July attack, killing Italians, Japanese, an American and an Indian before security forces stormed the restaurant to end the 12-hour siege.
The government says that July attack - and another on 26 July in which police killed nine militants believed to be plotting a similar assault - were the work of domestic militants.