By Serajul Quadir

DHAKA (Reuters) - Bangladeshi police shot dead two Islamist militants on Friday in a gunfight in Dhaka, including a prime suspect in the killing of 20 hostages, mostly foreigners, in a cafe in the capital last year.

Nurul Islam Marjan, 30, a commander of a splinter group of the Jamaat-ul-Mujahideen Bangladesh (JMB), was killed along with another suspected militant, Saddam Hossain, 35, the chief of Dhaka's counter-terrorism police, Monirul Islam, said.

Marjan was on a police wanted list for his role in the attack on the cafe last July, which raised alarm over the rising threat of Islamist militancy and cast a shadow over foreign investment in the poor Muslim-majority country.

Hossain was a "leader of killers in most of the sensitive killings in the northern region including a Japanese citizen", Home Minister Asaduzzamn Khan said.

Kunio Hoshi, 65, of Japan, was attacked in 2015 by unidentified assailants in Rangpur district, 335 km (210 miles) north of Dhaka and died on the way to hospital.

Attacks on foreigners are rare in Bangladesh. But it has seen a rising tide of Islamist violence over recent years, in which online critics of religious militancy have been hacked to death.

So far police have hunted down and killed at least 40 suspected militants linked to the cafe attack.

Police have attributed several attacks over the past two years to JMB, which says it is affiliated to Islamic State although the government insists Islamic State has no presence in Bangladesh.

In September, police arrested Marjan's wife, Shaila Afrin Prioyti, along with another two suspected female militants in Dhaka.

(Reporting by Serajul Quadir; Editing by Nick Macfie)