By MORGAN WINSOR and AICHA EL HAMMAR CASTANO, ABC News

(LONDON and RIO DE JANEIRO) — At least 79 inmates have died in riots at four prisons across Ecuador, authorities said.

Gen. Edmundo Moncayo, head of Ecuador’s prison system, known by its Spanish acronym SNAI, told reporters that the violence erupted Tuesday between rival drug gangs trying “to seize the criminal leadership of the detention centers.” He said the clashes were precipitated by a break in leadership of a prominent local gang called Los Choneros. The leader of Los Choneros was assassinated in December at a shopping mall in the port city of Manta in Manabi province.

Moncayo said a search for weapons was carried out at a large prison in the port city of Guayaquil in Guayas province on Monday. Officials were tipped off by Ecuador’s national police force that inmates had two firearms smuggled to them by a guard and were planning to kill Los Choneros leaders. That search sparked a series of coordinated mutinies in various prisons the following morning and it was not until the afternoon that authorities regained control, according to Moncayo.

Videos recorded by inmates and shared on social media showed mutilated bodies in the aftermath of the bloodbath.

As of Wednesday, 31 people had died at that prison in Guayaquil while six others had died at another prison in the same city. Thirty-four had died at a prison in the southern city of Cuenca in Azuay province and eight had died in the central city of Latacunga in Cotopaxi province, according to a statement from SNAI.

Moncayo plans to present a strategy to the Constitutional Court of Ecuador for preventing such violence from happening within the country’s prisons, an official at the Ecuadorian Ministry of Interior told ABC News.

The official said there were just 52 criminal deaths registered in Ecuador’s prison system last year.

An investigation into the deadly riots is ongoing and special units are carrying out operations, the official told ABC News.

Family of inmates have gathered outside the prisons as they await to hear whether their loved ones are safe.

Copyright © 2021, ABC Audio. All rights reserved.