Control of Guayaquil regional prison was regained by police and military after five hours riot that killed nearly 30 inmates, Ecuadorian officials say.

The violence involving gunfire, knives, and explosions was caused by a dispute between the
The violence involving gunfire, knives, and explosions was caused by a dispute between the "Los Lobos" and "Los Choneros" prison gangs. (AP)

Nearly 30 prisoners have been killed in a battle between inmates equipped with firearms and grenades at a prison in Ecuador's largest city , officials said.

It was the latest in a series of deadly prison clashes between rival drug gangs that have killed over 100 inmates this year.

Ecuador's attorney general's office said on Twitter it was investigating the deaths of 29 convicts at the Litoral Penitentiary in the city of Guayaquil, including six who were beheaded.

Officials gave conflicting statements on how many inmates were wounded, with the attorney general's office saying 42 while the national prison bureau earlier put that number at 48.

A police and military operation managed to regain control of the Guayaquil Regional prison after five hours, according to a statement from Ecuador's prison service on Wednesday.

Guayas state Governor Pablo Arosemena said at a news conference outside the prison that order had been restored. 

"The presence of the state and the law must be felt," he said.

The violence involving gunfire, knives, and explosions was caused by a dispute between the "Los Lobos" and "Los Choneros" prison gangs.

READ MORE: Several dead in two Ecuador prison riots

Series of prison riots 

Television images showed inmates firing from the windows of the prison amid smoke and the detonation of firearms and explosives. 

The Guayas state government posted images on its Twitter account showing six cooks being evacuated from one of the prison's wings. 

In July, President Guillermo Lasso decreed a state of emergency in Ecuador's prison system following several violent episodes that resulted in more than 100 inmates being killed. 

The bloodiest day occurred in February when 79 prisoners died in a simultaneous riot in three prisons in the country. 

In July, 22 more prisoners lost their lives in the Litoral penitentiary, while in September a penitentiary center was attacked by drones leaving no fatalities. 

Source: AP