At least 20 people died in a prison riot early Sunday in southern Ecuador, the president's office said, the latest outburst of deadly violence in the South American country's detention facilities.

"There are 20 reported dead who have been transferred to the Forensic Center of Cuenca," said President Guillermo Lasso's press office.

Five of the inmates were "mutilated" in the clash in the El Turi prison in Cuenca, Interior Minister Patricio Carrillo said.

Ecuador has struggled in recent years to contain prison violence -- usually gang-related -- with 320 inmates killed in riots in 2021.

Riot police shoot tear gas to try to quash a riot at the El Turi prison in Cuenca, Ecuador, on April 3, 2022
Riot police shoot tear gas to try to quash a riot at the El Turi prison in Cuenca, Ecuador, on April 3, 2022 AFP / FERNANDO MACHADO

Carrillo told reporters the riot had been brought "under control" following the deployment of 800 police and 200 members of the armed forces.

"The clashes have ceased but inside there are armed inmates," added Carrillo.

He said each bloc was being evacuated one by one so that weapons could be confiscated.

Trouble broke out at 1:30 am (0630 GMT) in the prison's maximum security section.

Inmates are seen on the roof of the CRS Turi prison after a riot in Cuenca, Ecuador, on April 3, 2022.At least 12 people died in a prison riot early Sunday in southern Ecuador, the president's office said, the latest outburst of deadly violence in the Sou
Inmates are seen on the roof of the CRS Turi prison after a riot in Cuenca, Ecuador, on April 3, 2022.At least 12 people died in a prison riot early Sunday in southern Ecuador, the president's office said, the latest outburst of deadly violence in the South American country's detention facilities. AFP / FERNANDO MACHADO

At midday, it was visibly still not under control, with inmates and police officers seen on rooftops.

Carrillo said the violence was gang-related.

"There is an organization that wants to take absolute control inside the center (but) some cells rebelled," he said.

Earlier in the day, Carrillo wrote on Twitter that Ecuador needs legal reforms to punish prison rioters.

Inmates are seen on the roof of the CRS Turi prison after a riot in Cuenca, Ecuador, on April 3, 2022.At least 12 people died in a prison riot early Sunday in southern Ecuador, the president's office said, the latest outburst of deadly violence in the Sou
Inmates are seen on the roof of the CRS Turi prison after a riot in Cuenca, Ecuador, on April 3, 2022.At least 12 people died in a prison riot early Sunday in southern Ecuador, the president's office said, the latest outburst of deadly violence in the South American country's detention facilities. AFP / FERNANDO MACHADO

"We need strong provisions for those that carry out this violence. They are identified and must lose all kinds of prison benefits," he said.

Family members congregated outside the prison waiting for news.

"They didn't know how to control the situation inside," a man who requested anonymity told AFP.

"I think they should have acted in a way to ensure there were fewer deaths," added the man, who was hoping for news about his brothers and a nephew.

Ecuador has 65 prisons with a capacity of 30,000 but they are overpopulated by 30 percent.

The El Turi prison is not overcrowded, though it is holding 1,600 prisoners in a facility with a 2,500 capacity.

Last year, there were several bloody prison uprisings.

In February 2021, simultaneous riots in four prisons left 79 inmates dead.

In September, in a prison in Guayas, Ecuador's most populous province, 119 inmates were killed in one of the worst prison massacres in Latin American history.

And in November, firearms, explosives and machetes were used in a gang battle that left 62 inmates dead in the same Guayas prison.

"Latin American prisons have for a long time become a constant threat, but the desire is there and we will take the necessary actions," said Carrillo.

The country has been rocked by an intensifying drug war which has led to a surge in the number of gangs battling over the illegal but lucrative drug trade.