At least two inmates have been killed and more than 80 injured during a prison riot in Kazakhstan, close to the Russian border.
Troops stormed the facility using batons and stun-grenades, but no firearms, the interior ministry said.
One of those killed was a man who jumped from a balcony after setting himself on fire, officials said.
The riot began as a protest against poor conditions and torture at the prison, activists said.
Officials at the prison in Akmola region say the men had illegally demanded an easing of the regime.
About 300 people took part in the riot which lasted three days.
More than 80 inmates had cut themselves in an effort to throw a spotlight on conditions at the jail.
Getting little response, the inmates built barricades and started fighting and throwing stones at prison officers, reports said.
Negotiations failed and special forces were sent in on Wednesday night to take control.
The government soldiers did not carry firearms, and the majority of the injuries were caused by prisoners stabbing and beating one another during the chaos, prison officials said.
The BBC's Rayhan Demytrie, in Almaty, says in the past few months dozens of prisoners across Kazakhstan have injured themselves in protest against inhumane conditions and alleged abuse by guards.
Last month, 38 people cut themselves in a prison in the north of the country.
One of the main problems with Kazakh prison colonies is overcrowding, our correspondent says.
According to a report by the UN Special Rapporteur on Torture, Manfred Nowak, the prison population in Kazakhstan is three times the average in Europe and well above the number in other post-Soviet countries.
At the beginning of 2010 there were nearly 64,000 prisoners in Kazakh jails. Officials say that number has now been reduced to just over 60,000.
Many of the prisons date from the Soviet era, when they were used as forced labour camps, or gulags.