The Russian state news media reported that the militants had seized an office building, which was then recaptured by security forces, and a school. Terrified residents of Grozny said they heard loud explosions and saw armed gunmen roaming the streets.

Andrey Chatsky, a spokesman for Russia’s National Antiterrorist Committee, confirmed in a statement broadcast on Russian television that 10 police officers had been killed and 28 injured in the armed clashes.

Ramzan Kadyrov, the head of the Chechen Republic, said in a statement posted on his website, “We have the corpses of nine militants.” Earlier, he told the news agency Interfax that the office building, called the House of Publishing and used by newspapers and other media, had been recaptured by morning, and that all seven militants inside had been killed.

The attack ended a period of relative stability in Chechnya and other largely Muslim regions of southern Russia.