Russian special forces freed two guards and killed several men linked to Islamic State who had taken them hostage at a detention center in the southern city of Rostov on Sunday, the prison service said.
Intense 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, 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.
The hostage takers, who included some already convicted of terrorism offenses, 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 center, 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 the Islamic State that bears an Arabic inscription.