Image copyright EPA Image caption Bangladeshi authorities denied IS involvement in the cafe attack

One of the suspected masterminds of the cafe attack in Dhaka, Bangladesh in July in which 20 hostages died has been killed in a shootout, police say.

Nurul Islam Marzan and a second unidentified man were killed in the early hours of Friday in Dhaka.

The deaths happened when anti-terrorism police raided a building in the Rayer Bazar area, police told AFP.

The cafe hostages were shot or hacked to death in what was Bangladesh's worst terror attack.

Commandos stormed the Holey Artisan cafe in the Gulshan neighbourhood after a 12-hour siege, rescuing 13 people. Two police officers and six militants were also killed in the 1 July attack.

Police said Marzan was a senior figure in the banned militant group Jamaat-ul Mujahideen Bangladesh (JMB) and was believed to have been the operational commander of the attack.

They say he planned it with Tamim Ahmed Chowdhury, a Canadian of Bangladeshi descent, who was killed in a police raid near Dhaka in August 2016.

There is no independent confirmation of what happened. In August there were accounts suggesting Marzan was being held in police custody, even as the authorities said they were trying to arrest him.

Image copyright Getty Images Image caption Bangladesh held two days of national mourning after the attack

The so-called Islamic State (IS) claimed responsibility for the cafe attack, posting online images of the attackers with a black IS flag. But Bangladeshi authorities have long insisted IS has no presence in the country and that JMB was solely to blame.

Since the attack, authorities have led a crackdown on militants, leaving dozens dead, many of them senior members of JMB.

Police said Marzan, who was about 30, joined a branch of JMB in 2015 after dropping out of Chittagong University, where he was an Arabic student.