DHAKA: One of the masterminds of Bangladeshs worst terror attack at a popular cafe here and another top militant behind the murder of a Hindu priest were killed today in a gunfight with police during a pre-dawn raid in the Muslim-majority country.

Neo-Jamaat-ul-Mujahideens wanted leader Nurul Islam alias Marjan and another extremist were killed by Counter-Terrorism and Transnational Crime (CTTC) unit in Mohammadpur Beribadh area of the capital.

"One is identified as Marjan and another is Saddam Hossain, an accused neo JMB member," Daily Star newspaper quoted Monirul Islam, chief of Counter Terrorism and Transnational Crime unit of Dhaka Metropolitan Police, as saying.

Police say Marjan coordinated the July 1 attack on Gulshans Holey Artisan Bakery that killed 22 people, including an Indian girl.

Saddam was wanted for at least ten murder cases, including Japanese national Kunio Hoshi murder, Jogeshwar Dasadhikari murder and attempt to murder a Bahai community leader in Rangpur, Monirul said.

Jogeshwar was hacked to death during an attack on a temple in Bangladesh?s Panchgarh district in February last year.

"Acting on a tip-off, we conducted a raid around 3am...Sensing our presence, the militants opened fire at us. In retaliation, we fired back that left the two injured," Monirul said.

Later, they were declared dead when taken to Dhaka Medical College Hospital.

According to an investigator, former Islami Chhatra Shibir leader Marjan was the youngest military commander of the Neo-JMB, a new faction of Jamaatul Mujahideen Bangladesh (JMB) affiliated with Islamic State, Dhaka Tribune reported.

He also had connection with a number of top leaders of the outfit. Marjan had expertise in operating heavy arms.

Marjan had stayed in the militant den of Gobindaganj in Gaibandha for a long period where he reportedly gave motivational training to seven militants. Of the seven, five took part in the Gulshan terror attack.

On July 1, militants stormed the bakery. The attackers took diners and restaurant staff hostage and had confrontations with police, killing two police officials.

Next morning, a joint commando force stormed the bakery, killing all the attackers and rescuing the captives, ending the terror siege of nearly 11 hours.