Azamat Shambilov is one of few outsiders to have visited Tajikistan's Kirpichniy prison before it became the scene of a deadly riot this week.
As the head of Penal Reform International's (PRI) office for Central Asia, Shambilov has visited the prison in the Vahdat district just outside Dushanbe earlier this year.
During a weekly talk show aired by RFE/RL's Tajik Service, Shambilov said that one of the facility's major issues was the lack of separate cells.
Instead, prisoners were being held in large groups -- of up to 200 people -- in big barracks, Shambilov said, calling it a "legacy of the Soviet Gulag."
"Imagine a huge room with four rows of bunk beds. [Tajikistan] should introduce the system of separate prison cells," Shambilov said during the May 23 segment of The World And Us.
Shambilov said Tajik authorities had begun to gradually demolish old buildings at the Vahdat facility and were constructing new sites, including a three-story building for 200 inmates and a teahouse.
PRI was granted access to the prison owing to an agreement signed with the Tajik government in September, Shambilov explained. It marked the first time in 15 years an organization like PRI had been granted access to the facility.
The prison came under international attention after Tajik authorities said that 29 inmates and three guards were killed during a riot that broke out there on May 19.
Officials have claimed that the violence was instigated by four inmates -- alleged members of the Islamic State (IS) extremist group -- who wanted to create chaos, free several of the fellow members of various militant groups from their cells, and escape.
According to the authorities, five inmates were stabbed to death by the rioters, while 25 inmates – alleged participants of the disturbances – were killed in the effort to quell the violence. The government's account cannot be independently verified.
The violence at the Vahdat facility was the second prison riot in Tajikistan in six months. Dozens of people were killed in violence in a maximum-security prison in the northern city of Khujand in November.
Government sources told RFE/RL at the time that suspected IS supporters convicted of religious extremism and terrorism were behind the unrest in Khujand.
A website linked to the IS group claimed at the time that one of its fighters was responsible for starting that riot.
Following the November violence, Tajik authorities fired several prison officials, while several others went on trial on negligence charges.
Some 30 inmates from the Khujand prison were tried behind closed doors for their alleged participation in the November riot.
Right activists and critics, however, say that firing or charging several prison officials is not the solution to the prison system's problems.
In April, a lawyer at the Coalition Against Torture In Tajikistan, a local nongovernmental group, said the government should address serious issues like widespread allegations of mistreatment of prisoners.
"Prison authorities must know that any violation of inmates' rights would be known to the general public sooner or later, even if this mistreatment takes place behind the walls of prisons," the lawyer said, speaking on condition of anonymity.
Tajikistan has long been criticized for alleged mistreatment of prisoners and below-standard prison conditions.
Just weeks before the May 29 riot, the head of the Kirpichniy facility, Dilovar Ismoilov, had warned that the violence in Khujand should serve as a wake-up call to prison officials in Tajikistan to "obey the law and order."
"The riot in Khujand adds to the responsibilities of the heads of the prison systems. The officials must put more serious efforts to prevent such riots," Ismoilov told RFE/RL's Tajik Service on April 12.
Shambilov said Tajik authorities should to take concrete measures and invest more funds to improve the situation. He also emphasized the need to conduct adequate training for prison workers.
He also said that prisons in Tajikistan and elsewhere in Central Asia need to work out special programs for prisoners convicted on terrorism and extremism-related charges to rehabilitate them.
"First of all, we must understand that not all of the inmates convicted on such charges are violent extremists and terrorists. In Central Asia, one can easily end up in prison for distribution of extremist literature or audio," he said.
"Many young people mistakenly end up in prison. It's important to determine the level of the risk, to determine to which degree this person is involved in extremist and terrorist organizations," Shambilov added.
Shambilov said it's important to include the families of such convicts in the process of their rehabilitation and reintegration back to society.
Thousands of people are serving long-term sentences in high-security prisons in Central Asia on terrorism and extremism charges.
Among its some 1,500 inmates, the prison in Vahdat holds many people convicted of membership in banned extremist groups as well as political opposition figures.