Russia's security services shot dead four inmates on Friday who had taken hostages at a jail in Volgograd and fatally stabbed four of its staff.
"Snipers of the special forces of the Russian National Guard in the Volgograd region, with four precise shots, neutralised four prisoners who had taken prison employees hostage. The hostages have been released," state news agency RIA quoted the National Guard as saying.
The federal prisons service said all four attackers had been "liquidated". It said four of its staff had died of stab wounds, and others had been treated in hospital. A total of eight prison employees and four convicts had been held hostage, it said.
The operation to free the captives took place after President Vladimir Putin, addressing a weekly meeting of his Security Council, said he wanted to hear from the interior minister, FSB security chief and head of the National Guard about the incident.
The demands of the hostage-takers were not clear, though in rambling monologues they said that Russia "oppresses Muslims everywhere" and that they had acted "without mercy" in response to alleged mistreatment of Muslim prisoners.
Russian news media said the four were citizens of Tajikistan and Uzbekistan, and that three were in jail for drugs offences and the other for murdering someone in a fight.

Iran rejects Trump's talk of negotiation as Israel and Iran launch airstrikes
No injuries reported as drone attack hits fuel tank at Kuwait's airport
US expected to send thousands more soldiers to Middle East
Philippines works with Washington to obtain oil from US-sanctioned countries
US safety agency says tracking system failed at LaGuardia during jet collision
Russia fires record 948 drones against Ukraine over 24 hours, Kyiv says
Death toll rises to 69 in Colombian military plane crash
One killed, five injured in Bahrain from Iran strikes
