Police in Bangladesh say they have killed three suspected militants, including an alleged masterminds of a major attack on a cafe last month that left 20 people dead.

Top counterterrorism official Monirul Islam said police raided a two-story house in Narayanganj district near Dhaka and killed the suspects early Saturday.

The dead included Tamim Chowdhury, a Bangladeshi-born Canadian, who police believe was one of two masterminds of the attack on a popular restaurant in Dhaka.

Police said they opened fire after the suspects started firing when the raid began.

Bangladesh police have been conducting raids across the country to hunt those behind the attack.