A policeman was killed after a suicide bomber tried to blow up a police station in western Algeria.

“The policemen on duty responded quickly, and one of them, in an act of bravery, threw himself on the assailant at the entrance of the headquarters and lost his life,” the national security directorate said. The suicide belt exploded, killing two policemen, according to state news agency APS.

The hero police officer was named as Tayeb Issawi, according to ennaharonline.com.

The attempted bombing happened on 31 August when an armed militant, wearing a suicide belt tried blow himself up in the police post in Tiaret, around 300 km (190 miles) west of Algiers.

The second police officer caught in the blast died later of his injuries, according to a police statement. A security cordon was set up by police at the scene of the explosion.

The Islamic State group’s news agency later claimed responsibility for the incident. “A martyr from Islamic State detonated a suicide vest close to the Algerian police station in the city of Tiaret,” Amaq said.

An Algerian police officer told The New Arab that the attack was connected to Jund al-Khilafa, an al Qaeda faction which had pledged allegiance to Isis. “You can be as good as you want but when it comes to suicide bombers there is nothing you can do,” he said. “You can only try to reduce damage but it is at the few seconds remaining before the attacker blows himself up.”

According to France 24, groups of militants affiliated to Isis have been carrying out recent offensives in Algeria.

“Vigilance seems to have been stepped down. We had a feeling that this was coming,” a former security services official said after the bombing.

In pictures: Isis' weapons factories Show all 11 1 /11 In pictures: Isis' weapons factories In pictures: Isis' weapons factories A mortar round fin manufactured by Isis in Gogjali, Mosul, November 2016 Conflict Armament Research In pictures: Isis' weapons factories Isis rocket components discovered in Gogjali, Mosul, Iraq in November 2016 Conflict Armament Research In pictures: Isis' weapons factories Isis mortars discovered near Karamlais, Iraq, in November 2016 CAR In pictures: Isis' weapons factories An Isis rocket launch frame in Qaraqosh, November 2016 Conflict Armament Research In pictures: Isis' weapons factories A memo from Isis' COSQC on quality control at a manufacturing facility in Gogjali, Mosul, November 2016 Conflict Armament Research In pictures: Isis' weapons factories Electrically-operated initiators manufactured by Isis in forces Gogjali, Mosul, November 2016 Conflict Armament Research In pictures: Isis' weapons factories Isis mortar tubes at a manufacturing facility in Karamlais, November 2016 Conflict Armament Research In pictures: Isis' weapons factories An Isis mortar production facility discovered in Gogjali, Mosul, in November 2016 Conflict Armament Research In pictures: Isis' weapons factories An Isis weapons manufacturing facilities near Mosul in November 2016 Conflict Armament Research In pictures: Isis' weapons factories Stocks of French-manufactured Sorbitol, Latvian potassium nitrate and Lebanese sugar at an Isis weapons factory in Iraq Conflict Armament Research In pictures: Isis' weapons factories A destroyed Isis weapons facility in Qaraqosh, Iraq, November 2016 Conflict Armament Research

The source, who asked not to be named, told AFP it was most likely carried out by Algerian members of ISIS who had escaped from countries where the militants were under sustained military attack.

This was the first suicide attack for several months in Algeria. A militant attempted to blow himself up at a police station in Constantine in April. In February, also in the city of Constantine, another suicide bomber died when a policeman opened fire on him, triggering the explosives belt he was wearing to explode. The attack was later claimed by Isis.

Al Qaeda in Maghreb, the group’s North Africa branch is also operating mostly in southern and eastern Algeria and target army and military forces.