MOSCOW — Islamist militants seized an empty school and office building Thursday before an hours-long shootout that pushed the death toll to at least 20 in the Russian region of Chechnya, authorities said.

The bloodshed in Grozny – where at least 10 militants and 10 police officers were killed – was an unwelcome reminder of the 1990s strife in Chechnya between Russian forces and separatist insurgents. The region has since experienced relative peace in recent years under the strong-arm governance of Kremlin-allied President Ramzan Kadyrov.

The attack came just hours before Russian President Vladimir Putin delivered an annual state of the nation speech in Moscow. Putin gained much of his initial political credibility as Russia’s leader by shutting down the insurgency and from his tough approach to Chechen-linked terrorist attacks elsewhere in Russia.

“These rebels have showed up in Chechnya again,” Putin said in the speech to Russia’s political elite at the Kremlin. “I’m sure the local law enforcement authorities will take proper care of them.”

The violence began early Thursday when a group of gunmen in three cars attacked police at a checkpoint, killing three officers, the National Anti-Terrorism Committee said. The militants then moved on to seize a 10-story publishing house in central Grozny and a nearby school. Russian news outlets said no teachers or students were inside because of the early hour.

Authorities surrounded the publishing house, killing at least six insurgents, Kadyrov said on his Instagram account. A fire gutted the building, and the body of at least one civilian was found in the rubble, the Interfax news service reported.

“We destroyed the devils,” Kadyrov told reporters in the Kremlin after Putin’s address. He said he had personally directed the security response before flying from Grozny to Moscow for the speech.

Footage released by the state-run Russia Today television channel showed more than a dozen security officers firing automatic weapons into the school. One officer fired at least one rocket-propelled grenade, and security forces also used heavy machine guns mounted on armored personnel carriers.

At least 10 police officers were killed and 28 were wounded, the National Anti-Terrorism Committee said. The organization said the operations prevented “massive terrorist attacks” and that firearms, grenades and 24 homemade explosive devices were found in the two buildings, Interfax reported.

There also was reportedly one unconfirmed civilian death.

A person proclaiming links to the Caucasus Emirate claimed responsibility for the attack in a YouTube video, but the claims and the source of the video could not be immediately verified.