Members of the National Police prepare before going out to patrol the streets of Duran
Members of the National Police prepare before going out to patrol the streets of Duran, city neighboring Guayaquil, Ecuador, on Nov. 5, 2022. Special police forces continue to transfer imprisoned criminal gang leaders who have unleashed terror in Guayaquil as part of the government's "open war" against drug trafficking. This is a representational image. Photo by Rodrigo Buendia/AFP via Getty Images

Seventeen Ecuador corrections officials held hostage by prison inmates were freed Wednesday, authorities said, as they struggled to compile a death toll from the dismembered body parts left over from days of fighting between rival gangs.

The 17 guards and administrative workers had been held at a prison in Esmeraldas, in the violence-hobbled country's northwest, the SNAI prison authority said.

"All of the corrections officials that were held in the prisons were freed," the government said in a statement Wednesday via its communications secretariat Segcom.

Unrest had spread to this and other prisons after the latest outbreak of brutal fighting Saturday at the faraway Guayas 1 prison in the port city of Guayaquil, which continued until Tuesday when 2,700 police and soldiers wrested back control.

What they found at Guayas 1 was gruesome.

"We are still... conducting the investigation on site, but so far we have 11 corpses and 29 pieces of anatomy," said police general Cesar Zapata Correa.

A government decree issued Tuesday to announce a 60-day state of emergency in the country's prisons mentioned that at least one of the Guayas 1 victims had been beheaded -- a common form of assassination in prisons, along with burning rivals alive.

On Tuesday, officials had put the death toll from the Guayas 1 riot at 31 inmates, but the final tally is now unclear.

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.

A string of bloody clashes has claimed at least 420 lives in Ecuadoran prisons since 2021.

Fewer than 3,000 guards are in charge of more than 31,000 inmates in 36 prisons around Ecuador, many of them overpopulated.

In Tuesday's raid, members of the security forces seized rifles, revolvers, machetes, dynamite, ammunition, drugs and money.

Images shared with the media also showed such items as refrigerators, speakers, jewelry and fans.

As the unrest in Guayaquil was being brought under control, problems started in Esmeraldas province, with a riot at the prison as well as bomb threats at businesses and vehicles burned the streets of the provincial capital of the same name.

After a bomb was defused at the prosecutor's office, civil servants and school children in the city of 220,000 people were given the rest of the day off.

Guayaquil, on Ecuador's southern Pacific coast, is the country's largest city, biggest port and economic hub, but in recent years has become the increasingly bloody center of a gang turf war.

The location of the city, home to three million of Ecuador's 18 million people, makes it a strategic launch point for drug shipments to the United States and Europe.

Tucked between Colombia and Peru, the world's main cocaine producers, once-peaceful Ecuador has seized 455 tons of drugs since May 2021.