Security forces in Bangladesh raided an area on the outskirts of capital Dhaka and killed several militants, including the alleged "mastermind" of the July attack on the Holey Artisan Bakery in the capital's Gulshan neighbourhood.

Twenty civilians and two security personnel were killed in the attack by a group of armed militants with alleged links to Islamic State (Isis), which even claimed responsibility for the attack.

Counter-Terrorism and Transnational Crime unit chief Monirul Islam confirmed to the Dhaka Tribune that Bangladesh-born Canadian Tamim Ahmed Chowdhury — the" mastermind" — and two other suspected militants were killed in the raid at Narayanganj on Saturday, 27 August, morning.

Law enforcement agencies in the country raided the militant hideout after extracting information from the people arrested in connection with the attack, a police source told the paper seeking anonymity. A joint team of the counter-terrorism unit, Rapid Action Battalion, and local police began the raid on a three-storied building around 9.36am local time (4.36pm BST) that lasted until 10.35am local time.

There was a heavy gun battle between the joint forces and the militants, Narayanganj ASP Faruk Hossain reportedly told the paper. He added that the militants burnt some materials, which they believe were important documents carrying details about their activities.

Earlier on Friday (26 August), Monirul Islam, DMP Additional Commissioner and chief of Counter-Terrorism and Transnational Crime, said: "Many people have given us information about the duo [Chowdhury and sacked Major Syed Ziaul Haque]. We have launched drives scrutinising the information in different areas. But they could not be arrested.

"We have found a few dens where Tamim and Zia stayed for some time. But they managed to flee those houses evading arrest. Raids to arrest them are on," he added.

Dhaka cafe attack
A joint team of Bangladesh law enforcement agencies killed the mastermind, Tamim Ahmed Chowdhury, of the July Dhaka cafe attack following a raid at Narayanganj on the outskirts of the capital - File photo Reuters

Islam said they have questioned Hasnat Reza Karim — one of the rescued victims of the attack, who was later detained over his alleged involvement in the attack — and Tahmid Hasib Khan. They could be charged if they provide some "solid information" about the attack.

A number of gunmen had charged into the cafe in the heart of Dhaka on 1 July opening fire randomly at people. The cafe is popular among expatriates and many of the victims were foreigners. The attackers were reported to have mercilessly tortured people who could not recite verses from the holy Muslim book, Quran.