Russia launched a terrorism probe Wednesday after a 17-year-old student blew himself up at the regional headquarters of the FSB security agency, wounding three employees.
Several minutes before the suicide blast in the northern city of Arkhangelsk, a post on an anarchist forum warned of an imminent explosion.
Investigators said they were checking whether the suspected bomber was a member of any banned organisations and talk to his friends and relatives to "find out the motives for the crime".
An explosive device detonated in the FSB building shortly before 9:00 am (0600 GMT), authorities said.
Investigators identified the bomber as a 17-year-old local resident.
An official, who spoke to AFP on condition of anonymity, named the suicide bomber as Mikhail Zhlobitsky, a student at a local technical college.
Investigators probing the attack released a photo of the suspect -- a skinny young man with a backpack -- inside the FSB building.
Authorities cordoned off streets around the building for several hours, with police and experts combing the area for clues.
Attacks on police and security services are common in Russia's restive Northern Caucasus, but are rare in the rest of the country.
President Vladimir Putin -- himself a former FSB officer -- was informed about the explosion, his spokesman Dmitry Peskov told reporters, but declined to speculate on the motive.
Investigators said they had opened a probe into terrorism and illegal possession of ammunition.
Alexander Bastrykin, the head of the Investigative Committee probing the case, said the young man's motives should be established "as soon as possible." Investigators searched Zhlobitsky's apartment and questioned his relatives and friends.
Three FSB employees were hospitalised with injuries after the blast in Arkhangelsk, which is more than 1,000 kilometres (620 miles) north of Moscow.
"One man is in surgery," a spokeswoman for the regional FSB told AFP.
Seven minutes before the blast, a post in an anarchist forum on Telegram, a messaging service, warned that the FSB building would be the target of a "terror attack." The writer of the post, who signed as Valeryan Panov, said he would claim responsibility for it.
"The reasons are quite clear to you," said the post.
"It (the FSB) is inventing cases and torturing people. I will most likely croak in the blast," he added.
"I wish you a bright future of anarchist communism." The FSB is the main successor to the feared KGB agency known for persecuting dissidents in the Soviet era.
Starting in 2017, the FSB has launched several cases against young anarchists in the cities of St Petersburg and Penza. Avtonom.org, an anarchist website, have labelled the arrests "repressions" and said the young men were being tortured in custody.
The website said on Wednesday evening however that the attacker in Arkhangelsk "has never been in contact with us", that they don't know of any "noticeable anarchist activities" in the northern city.
Attacks by anarchists on Russian authorities have in the past included setting police cars on fire and throwing Molotov cocktails at the offices of the ruling party United Russia.
Regional governor Igor Orlov said that the authorities were working to establish the type of explosive used.
"Things are very serious," he said, blaming the attack on "destructive forces" that influence young Russians.
"We are taking measures to increase the security of all public and state buildings in Arkhangelsk region," he added.
(With inputs from agencies.)