The Chechen conflict spread once again to another Caucausus republic when rebels launched an extensive raid on a city in southern Russia.
Dozens of people are reported to have been killed after militants attacked buildings with gunfire and explosives.
A Chechen armed group has used a website to claim responsibility.
The coordinated attacks happened in Nalchik, the main city of the republic of Kabardino Balkaria which is in the same region as Chechnya.
20 rebels, 12 security force members and 12 civilians were killed in the clashes, according to officials. But local media claim the final figure may be higher.
The Kremlin has said the city is now under control and that 12 attackers have been detained. A follow-up operation is continuing to find the rest of the gang.
At the height of the battle, a school near a police station was evacuated, causing false rumours that children had been taken hostage.
Kabardino-Balkaria is also near the North Ossetia province where Chechen militants attacked a school in Beslan last year, resulting in the deaths of 331 people, half of them children.
The assault on Nalchik is similar to a raid in June 2004 when pro-Chechen militants attacked police buildings in Nazran and effectively seized control of Ingushetia, also in the Caucusus region. About 60 people, many of them police, were killed in that attack.
The Russian President Vladimir Putin has urged the toughest possible response to the raid on Nalchik. Russian news agencies said that he told security force commanders that every gunman who refuses to surrender should be killed.
He ordered troops to put a security cordon around the city so that none of the attackers could escape.
His reaction to this incident is in contrast to his response at the beginning of the Beslan siege, when people accused him of remaining silent for too long in the early stages of the stand-off.
Putin came to power in 2000 after talking a tough stance on rebels in Chechnya.