The violence started late on Wednesday when an inmate believed to be a member of militant group Islamic State attacked a guard and seized his assault rifle, said an interior ministry official who declined to give his name.
Officers restored order hours later with the help of reinforcements, a security official speaking on condition of anonymity said.
The prison in the northern Tajik city of Khujand is where prisoners convicted of religious extremism offences, including membership of Islamic State, are generally held. It also houses other prisoners.
Both officials said at least 25 inmates were killed, as well as one warder and one policeman. The third source, also a security official, said three guards had died.
Local authorities confirmed a riot had occurred but gave no details.
In July, Islamic State claimed responsibility for an attack which killed four Western tourists in Tajikistan, an impoverished Central Asian country. (Reporting by Nazarali Pirnazarov Writing by Olzhas Auyezov Editing by John Stonestreet)
(This story has not been edited by Devdiscourse staff and is auto-generated from a syndicated feed.)