Russian special forces have freed two guards and killed several men linked to Islamic State who had taken them hostage at a detention centre in the southern city of Rostov, the prison service said.
Automatic gunfire could be heard in footage published on Russian Telegram channels.
“The criminals were eliminated,” Russia’s federal penitentiary service said in a statement on Sunday, adding that 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.
The hostage-takers, who included some already convicted of terrorism offences, had knocked out the bars of a window in their cell and entered a guard room, where they took at least two prison officers hostage, Russian media said.
State media said that some of the men were accused of affiliation with the Islamic State militant group, which claimed responsibility for a deadly attack on a Moscow concert hall in March.
Before special forces stormed the detention centre, one of the hostage takers was shown by the 112 Telegram channel brandishing a knife beside one of the bound guards.
The hostage-taker wore a headband with the flag used by Islamic State that bears an Arabic inscription.