The Islamic State group claimed responsibility for the attack in a statement carried by its Aamaq news agency

Receive the latest national-international updates in your inbox

Members of Crime Scene Unit investigate the spot where an unidentified intruder has died in a blast after attempting to enter the camp of Rapid Action Battalion (RAB) in Dhaka, Bangladesh, Friday, March 17, 2017. A suspected militant died Friday when he exploded a bomb at the future headquarters of the Bangladesh security agency, officials said.

A man carrying explosives was fired on and killed when he tried to cross a checkpoint run by an elite anti-crime force in Bangladesh's capital on Saturday, officials said.

In a text message to media, the Rapid Action Battalion said the security officers opened fire as the man tried to penetrate the checkpoint with "a motorbike and explosives" in Dhaka's Khilgaon area.

The agency's operational official A.S.M. Sakhawat Hossain told reporters that officers found the explosives in a bag the man was carrying.

Hossain said bomb experts were at the scene to examine the explosives.

Mufti Mahmud Khan, a spokesman for the agency, said two officials were injured but it was not clear how.

On Friday, a suspected militant died when he exploded a bomb at the camp where the agency's future headquarters is under construction. The Islamic State group claimed responsibility for the attack in a statement carried by its Aamaq news agency.

Bangladesh has experienced a surge in militant attacks in recent years, with atheist bloggers, writers and publishers, as well as foreigners and members of minority communities all targeted.

In July, 20 hostages, including 17 foreigners, were killed by a group of five militants in a restaurant in Dhaka. The Islamic State group claimed responsibility for the attack, but the government of Prime Minister Sheikh Hasina rejected that, saying the men belonged to domestic group Jumatul Mujahedeen Bangladesh.