Guayaquil, Ecuador — Some 2,700 soldiers on Tuesday stormed a prison in Ecuador, retaking control of the facility as the death toll from a riot that started over the weekend rose to 31 inmates, authorities said. The latest battle between rival gangs at the overcrowded, violence-hobbled Guayas 1 prison in the port city of Guayaquil has left 31 people dead and 14 wounded, the public prosecutor’s office said, updating an earlier death toll from 18.

Riots regularly pit prison gangs with links to drug traffickers against one another in Ecuador, a country that has recently emerged as a key player in the South American cocaine trade.

ECUADOR-PRISON-VIOLENCE Military forces stand guard outside the Guayas 1 prison where a days-long riot between rival gangs claimed at least 31 lives in the port city of Guayaquil, Ecuador, July 25, 2023. MARCOS PIN/AFP/GETTY A string of bloody clashes has claimed at least 420 lives in Ecuadoran prisons since 2021 — many of the victims beheaded or burnt alive, others shot as widespread corruption among guards allows inmates to obtain guns and explosives.

Among those wounded in the latest round of violence was a police officer, said the prosecutor’s office.

The armed forces, for its part, said soldiers and police entered Guayas 1 on Tuesday to put down the riot that started Saturday and had left an initial toll of six dead inmates.

At least one of the dead had been beheaded, according to a government decree issued Tuesday announcing a 60-day state of emergency in all Ecuador’s prisons.

The government, via its communications secretariat Segcom, said “total control” had been regained at Guayas 1, which houses over 5,600 inmates.

Officers seized nine rifles, a grenade launcher, four pistols, two revolvers and 1,000 rounds of ammunition, according to officials.