Militants on Tuesday stormed parliament in Russia's conflict-torn region of Chechnya, holding deputies and gunning down three people, before being killed in a bloody standoff with security forces.
The group of up to four militants broke into the parliament building in the Chechen capital Grozny early in the morning, sparking fears of a major hostage crisis before security forces moved in.
The dramatic raid was a major blow to Kremlin claims that stability has returned to Chechnya, after two wars since the collapse of the Soviet Union and years of Islamist and separatist-inspired unrest.
Officials said that all the militants were killed after an hour-long standoff, with two of the rebels shot dead by the security forces and two killing themselves by detonating suicide charges.
Shaken deputies wearing bullet-proof vests were led out to safety by the security forces while headscarved women who work into the parliament were guided into an armoured personnel carrier.
"We heard shots in the courtyard and we knew they were trying to take us hostage. We managed to take refuge on the third floor where we stayed until the end of the operation," spokesman for the Chechen parliament, Zelim Yakhikhanov, told AFP.
Chechnya's leader Ramzan Kadyrov said in a statement that Chechen security forces staged an intense 20-minute operation to kill the militants and free the parliament deputies and employees from the building.
"All deputies are alive and were taken from the territory of the parliament building to safety," Kadyrov said.
Three people -- two police working as security at the parliament and one civilian employee -- were killed in the raid, the investigative committee of prosecutors said, adding 17 people were wounded.
"Two of the rebels blew themselves up while two were surrounded on the upper floor and measures were undertaken to neutralize them," the National Anti-Terror Committee said according to the ITAR-TASS news agency.
The militants drove up to the building in a car and managed to break through the security cordon onto the parliament grounds by following a car driven by a deputy, ITAR-TASS said.
Russian Interior Minister Rashid Nurgaliyev -- by coincidence on a trip to Grozny -- said the operation by the security forces to free the deputies was a success and claimed Chechnya was "stable and safe".
"As always, they (the militants) failed. They were intercepted by interior ministry troops," he said at a televised meeting at the local interior ministry.
President Dmitry Medvedev is attending a summit in France and a Kremlin official said he had been kept informed in a telephone conversation with the head of the FSB security service Alexander Bortnikov, Nurgaliyev and Kadyrov.
The EU's diplomacy chief Catherine Ashton said she was "appalled" by the attack and pledged to strengthen cooperation with Russia to fight international terror.
The special operation was personally led by Kadyrov, Interfax quoted a security source as saying.
The Kremlin has been fighting separatist insurgents in the Northern Caucasus since after the collapse of the Soviet Union and waged a war in 1994-1996 against separatist rebels in Chechnya.
However, after a second war broke out in Chechnya in 1999, the rebellion's inspiration moved towards Islam with the aim of imposing an Islamic state in the region.
Russia in April 2009 ended a decade-long "counter-terror" operation in Chechnya, a move seen by some analysts as premature.
Chechnya has in the past years seen a relative improvement in security under its strongman leader, Kadyrov, although attacks remain common.
But Kadyrov, himself an ex-rebel, has been heavily criticised for his tough tactics by rights groups, who accuse him of torture and using his own personal forces to crack down on critics.
Russia remains on high alert for militant attacks after the double bombings carried out by two female suicide bombers on the Moscow metro on March 29 killed 40 and wounded more than 100.
Over 330 people were killed in Russia's most shocking hostage tragedy in 2004 when Chechen militants stormed a school in the town of Beslan in the Northern Caucasus region of North Ossetia.