John Kerry, US secretary of state, has arrived in Dhaka to meet Sheikh Hasina, Bangladesh prime minister, and discuss security cooperation following a wave of deadly attacks in the country.

Monday's meeting is also due to discuss economic development and human rights as Kerry plans to meet opposition and civic leaders during the day-long visit, his first to the South Asian nation where an attack on a cafe in July killed 22 people, mostly foreigners.

Kerry's visit comes two days after the suspected mastermind behind the cafe attack was killed by police in Dhaka.

The US and Bangladesh have a "long-standing partnership" with "programmes in place for many, many years that deal with counter-terrorism and security partnership", a senior US state department official said ahead of Kerry's arrival.

The Islamic State of Iraq and the Levant (ISIL) group claimed responsibility for the July 1 attack on the Dhaka cafe in which armed men held hostage mainly Western diners including one American, before killing them.

Hasina's government denies ISIL, also known as ISIS, has a presence in Bangladesh, instead blaming the Jamayetul Mujahideen Bangladesh (JMB) and other local armed groups for the bloodshed.

Just hours before Kerry's arrival, Bangladesh police shot dead two suspected JMB members.

The suspected fighters, including a regional JMB commander, were killed during a gun battle with security officers in the northern town of Sherpur town, a police spokesperson said.

Michael Kugelman of The Wilson Center, a Washington DC-based think-tank, said the US administration has not paid enough attention to the growing security threats in Bangladesh, which is now affecting Americans.

"It has arguably taken its eye off the ball even as this threat has begun to directly affect Americans," Kugelman said.

INFOGRAPHIC: Bangladeshi's soft targets

"One of Kerry's core intentions in Dhaka will simply be to emphasise the importance that the US accords to security problems in Bangladesh, and Washington's strong desire to help the government there address them."

Bangladesh has been reeling from a series of attacks in the last three years, including on foreigners, rights activists and members of religious minorities.

Critics say Hasina's administration has been in denial about the nature of the threat posed by armed groups and accuse her of trying to exploit the attacks to demonise her domestic opponents.

Source: Agencies