Ecuador’s prison service, known by its initials as Snai, said that the clashes had been triggered by plans to move some of the inmates to a newly-built prison.

El Oro prison was the site of another deadly incident in September when 13 inmates and a guard were killed in clashes between rival gangs.

Relatives of the prisoners have asked the authorities to step up security inside the prison, including keeping rival gang separate, whilst residents of Machala have long demanded that the facility, which is located in the city centre, be relocated.

Earlier this year, the government of President Daniel Noboa announced the construction of a new maximum security jail in the province of Santa Elena.

The new prison, named El Encuentro, is expected to open in late November, and according to the interior minister, will boast all the latest security measures.

Prison gangs have for years played a key role in the rise of violent crime in Ecuador and two of them, Los Lobos and Los Choneros, were declared Foreign Terrorist Organisations by the US Department of State in September.