A soldier asks for calm from the friends and family members of inmates seeking information after deadly clashes at the Litoral Penitentiary, in Guayaquil, Ecuador, July 25, 2023. (PHOTO / AP)

QUITO – Ecuador's attorney general raised the death toll from a wave of violence over the weekend in one the country's most dangerous jails to 31 late on Tuesday, after the government earlier declared a 60-day state of emergency for the country's prisons.

The emergency declaration seemed to set off violence in the city of Esmeraldas, where 15 prison guards and two other staffers were being held hostage at a local jail, the government said in a statement.

In Esmeraldas itself, a police unit was attacked, explosives were placed at gas stations and several cars were burned. The attorney general's office said on social media that one civilian was hurt in a Molotov cocktail attack on its office there.

READ MORE: Ecuador declares state of emergency amid violent clashes

In Guayaquil, at least 2,700 heavily equipped soldiers and police officers entered the Penitenciaria del Litoral prison after enactment of the 60-day measure, regaining control of three cellblocks with controlled detonations.

Military intervention in Ecuador's prisons will continue until control has been retaken and there is no threat to prisoners or officials, the government said

Clashes between gangs began on Saturday at the prison, one of the most dangerous in Ecuador.

The prosecutor's office raised the death toll to 31 from 18 in a post on social media platform X, formerly known as Twitter. It also raised the number of injured to 14.

Some 120 prison officers had been freed after being held hostage in six jails around the country, the government said. There was no official information about hunger strikes allegedly taking place at some prisons.

ALSO READ: Ecuador National Assembly dissolved, early elections on way

This latest surge of prison violence comes during campaigning for Aug 20 elections, with some presidential candidates pledging prison reforms.

According to the decree signed by President Guillermo Lasso, inmates in Guayaquil used firearms during the unrest and set fire to facilities using gas tanks.

Lasso on Monday declared a state of emergency in the provinces of Manabi and Los Rios and in the city of Duran, after the mayor of the city of Manta, Agustin Intriago, was shot dead on Sunday.

ALSO READ: Ecuador's National Assembly opens impeachment trial against Lasso

Military intervention in Ecuador's prisons will continue until control has been retaken and there is no threat to prisoners or officials, the government said.

Lasso has regularly declared states of emergency in the country's prisons as he tries to tackle violence that has surged since 2021, claiming the lives of hundreds of prisoners.