'Tamim Chowdhury is dead. He is the Gulshan attack mastermind and the leader of JMB (Jamayetul Mujahideen Bangladesh),' said senior police officer Sanwar Hossain. In photo: An injured is helped after the attack on the Holey Artisan cafe. Photograph: (Getty)
Two other Islamist extremists were killed in the hour-long gun battle in Narayanganj, 25 km south of the capital
Bangladesh police stormed a militant hideout outside Dhaka Saturday, shooting dead three Islamist extremists, including the suspected mastermind of a horrific attack on a cafe that killed 22 mostly foreign hostages last month.
The three bodies were retrieved after police staged an hour-long gun battle with extremists in Narayanganj, a city 25 kilometres (16 miles) south of Dhaka, officers said.
"Tamim Chowdhury is dead. He is the Gulshan attack mastermind and the leader of JMB (Jamayetul Mujahideen Bangladesh)," senior police officer Sanwar Hossain told AFP.
The police raid came two days before US Secretary of State John Kerry is set to arrive in Bangladesh, the highest-ranked Western official to visit the South Asian nation since the attack.
Officials said security issues, including Dhaka-Washington DC anti-terror cooperation, will feature during Kerry's talks with his Bangladeshi counterpart on Monday.
Chowdhury, a 30-year-old Bangladeshi-Canadian citizen who returned from Canada in 2013, had earlier been named by police as the suspected mastermind of the attack on the cafe in Gulshan, an upscale Dhaka neighbourhood.
"The operation went on for an hour. We can see three dead bodies. They did not surrender. They threw four to five grenades at police and fired from AK 22 rifles," Bangladesh national police chief A.K.M Shahidul Hoque told reporters Saturday.
"Three extremists were killed. Among them, one of the dead persons looked exactly like the photo of Tamim Chowdhury that we have," he said.
The Islamic State group claimed responsibility for the July 1 attack, releasing photos from inside the cafe during the siege and of the five men who carried out the deadly assault and were shot dead at its finale.
But police and the Bangladesh government rejected the IS claim, saying a new faction of JMB led by Chowdhury was behind the attack in which 20 hostages, including 18 foreigners, were killed along with two policemen.
Police blame the JMB, a homegrown militant group, for the deaths of more than 80 foreigners and members of religious minorities over the last three years.
"Tamim Chowdhury's chapter is closed here," Bangladesh home minister Asaduzzaman Khan told reporters after visiting the site of the raid Saturday.
He said other extremists were "very few" in number and face imminent arrest.
A series of raids on suspected militant hideouts carried out with the Rapid Action Battalion elite security force have killed at least 24 extremists since the cafe attack.
Police on August 2 announced a two million taka ($25,000) reward for information leading to the arrest of Chowdhury, who disappeared after the attack.
Police say Chowdhury has led and financed efforts to radicalise young Muslims since returning from Canada three years ago.
His role in fostering extremism was revealed during the interrogation of Rakibul Hasan, 25, who was arrested in a raid on a militant hideout in July in which nine extremists were killed in Dhaka.
A police report into that raid said Chowdhury and others gave Hasan and other militants "money, explosives and weapons" and "trained and advised" them.
Bangladesh has been reeling from a deadly wave of attacks in the last three years, including on foreigners, rights activists and members of the country's religious minorities.
In June more than 11,000 people were arrested in a bid to quash a spate of brutal murders of secular writers, gay rights activists and religious minorities.
Both IS and a branch of Al-Qaeda have claimed responsibility for many of the attacks.
Bangladeshi authorities have rejected the claim, saying international jihadist networks have no presence in the world's third-largest Muslim-majority nation.
Critics say Prime Minister Sheikh Hasina's administration is in denial about the nature of the threat posed by Islamist extremists and accuse her of trying to exploit the attacks to demonise her domestic opponents.