Deputy Tynchbek Akmatbayev, who went into the prison to negotiate with the inmates, and one of his bodyguards were killed when a shoot-out started at the prison.
There were reports that the head of Kyrgyzstan's prison administration Ikmatulla Polotov was severely beaten and was in serious condition at a nearby hospital.
Prime Minister Feliks Kulov negotiated with the prisoners, demanding the bodies of those killed be brought out and turned over to authorities.
Kulov also convinced the prisoners to stop rioting. Many of the inmates in the prison suffer from tuberculosis and were
demanding better living conditions.
It was the second prison riot in Kyrgyzstan this week.
(With agencies)