An ambulance carries a casualty after an explosion at the entrance of an FSB office in the city of Akhangelsk, in northern Russia, Wednesday, Oct. 31, 2018. The local governor says one person has been killed and three injured after a bomb went off at the entrance of the local branch of Russia's main intelligence agency. (AP Photo/Maria Vavilina) An ambulance carries a casualty after an explosion at the entrance of an FSB office in the city of Akhangelsk, in northern Russia, Wednesday, Oct. 31, 2018. The local governor says one person has been killed and three injured after a bomb went off at the entrance of the local branch of Russia's main intelligence agency. (AP Photo/Maria Vavilina)

MOSCOW (AP) — A man set off a bomb at the entrance of the local branch of Russia’s main intelligence agency in a northern city Wednesday, injuring three security officials and killing himself, authorities said.

The man entered the local branch of the FSB intelligence agency in Akhangelsk and removed the improvised explosive device from a bag, causing it to detonate, the National Anti-Terrorist Committee said.

The explosion killed the man and injured three FSB officers. It was not immediately clear if the man had meant to just leave the bomb or had also intended to die.

Russian investigators later identified the attacker as a local 17-year-old man and said they are treating the attack as an act of terrorism.

Akhangelsk governor Igor Orlov had earlier reported one death but did not indicate that that was the attacker. Authorities cordoned off the area around the FSB office and boosted security measures at all public offices in the city.

The FSB and other security have been targeted in the past in another region, the North Caucasus, mostly by Islamist insurgents.