DHAKA - As many as eight militants blew themselves up with a grenade north of the Bangladeshi capital rather than surrender, police said on Thursday, the latest clash in the South Asian country that has seen a rise in violence.

Police urged the militants, holed up in their hideout in Nasirpur, northeast of the capital Dhaka, to give themselves up on Wednesday, but instead they detonated the grenade. “Up to eight militants, including a female, were killed,” Monirul Islam, the chief of police counter terrorism and transnational crime, told reporters.

On Monday, Bangladesh army commandos killed four militants in the northeastern city of Sylhet during a raid on a building where they were holed up.

On Saturday, six people, including two police, were killed and more than 40 wounded in two bomb blasts near the militant hideout in the Sylhet building.

Islamic State claimed responsibility “for a bombing on Bangladeshi forces in Sylhet”, the SITE monitoring service said, citing a report on the militant group’s news agency Amaq that appeared to refer to that incident.

Islamic State and al Qaeda have made competing claims over killings of foreigners, liberals and members of religious minorities in Bangladesh, a mostly Muslim country of 160 million people.

The government has consistently ruled out the presence of such groups, blaming domestic militants instead.