Russian special forces stormed a detention centre in southern Russia, freeing two prison guards and shooting dead six inmates linked to the Islamic State militant group.
The inmates had taken two guards hostage at the detention centre in the southern city of Rostov on Sunday, Russian media said.
State media said that some of the men had been convicted of terrorism offences and were accused of affiliation with the Islamic State militant group.
The group claimed responsibility for a deadly attack on a Moscow concert hall in March.
The six hostage takers, one of whom wore a headband with the flag used by the Islamic State that bears an Arabic inscription, knocked out window bars and climbed down several floors by rope before taking the guards hostage with a knife and fire axe.
In video published by the 112 Telegram channel, one was shown brandishing a knife beside one of the bound guards in Rostov-on-Don.
In negotiations with the authorities, they demanded free passage out of the prison.
But Russian special forces decided to storm the prison.
Intense automatic gunfire could be heard in footage published on Russian Telegram channels.
Video published by the 112 Telegram channel showed the six dead men in pools of blood.
"The criminals were eliminated," Russia's Federal Penitentiary Service said in a statement, which said a "special operation" had taken place to free the hostages.
"The employees who were being held hostage were released. They are uninjured," the prison service said.
Ambulances were seen entering the complex.
Islamic State, a Sunni Muslim militant group, was defeated in Iraq and Syria by a combination of US led forces, Kurdish fighters, and Russian, Iranian and Syrian soldiers.
It splintered into different regional groups that have claimed a number of deadly attacks across the world.
Islamic State Khorasan (ISIS-K), named after an old term for the region that included parts of Iran, Turkmenistan and Afghanistan, claimed responsibility for the March attack on the Crocus City Hall outside Moscow in which 145 people died.
According to Russian media, the hostage takers were from Russia's southern republic of Ingushetia and three of them had been detained in 2022 for planning an attack on a court in another Russian republic, Karachay-Cherkessia.
Reuters