Bangladesh police have stormed a house outside the capital, Dhaka, shooting dead three people, including the main suspect in the last month's cafe attack that killed 22 hostages.

"We can see three dead bodies here," senior police officer Sanwar Hossain told AFP news agency on Saturday.

"Tamim Chowdhury is dead. He is the Gulshan attack mastermind and the leader of JMB [Jamayetul Mujahideen Bangladesh, a domestic armed outfit]," he said.

Chowdhury, a Bangladeshi-Canadian citizen, had earlier been named by the police as the main suspect in the attack on the cafe in Gulshan, an upscale Dhaka neighbourhood.

The bodies were retrieved after police staged an hour-long gun battle with the suspects in Narayanganj, a city 25km south of Dhaka, Hossain said.

"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 AKM Shahidul Hoque told AFP.

Demonising the opponents

Al Jazeera's Tanvir Chowdhury, reporting from Dhaka, said it would likely require relatives to positively identify the body or DNA testing to confirm that the person killed was Tamim Chowdhury, as the police have reported.

"The police do claim a lot [of] things but then later we find out that there are a lot of gaps in the information. So we will have to wait until it's confirmed," he said.

A team from the Counter Terrorism and Transnational Crime unit and police cordoned off the house in Narayanganj area earlier this morning on information that suspects were staying there, Mainul Haq, superintendent of Narayanganj police, told The Daily Star newspaper.

At least 20 hostages, including 18 foreigners and two policemen, died in last month's attack on the Holey Artisan Bakery cafe in Dhaka, which was claimed by the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group.

In June more than 11,000 people were arrested in an effort to quash a spate of brutal murders of secular writers, gay rights activists and religious minorities.

Both ISIL and a local branch of al-Qaeda have claimed responsibility for many of the attacks.

Critics say Prime Minister Sheikh Hasina's administration is in denial about the nature of the threat posed by armed groups and accuse her of trying to exploit the attacks to demonise her domestic opponents.