JAIR ARAUJO via Getty Images Vans of the Legal Medicine Institute (IML) carrying bodies of inmates killed during a riot, leave the Anisio Jobim Penitentiary Complex (Compaj) in Manaus, Amazonia, Brazil.

BRASILIA, Jan 2 (Reuters) - Around 60 people were killed in a prison riot in the Amazon jungle city of Manaus, with decapitated bodies of drug gang members thrown over prison walls, officials said on Monday.

It was the bloodiest violence in more than two decades in Brazil’s overcrowded penitentiary system.

The security chief for Amazonas state, Sergio Fontes, told a news conference the death toll could rise as authorities get a clearer idea of the scale of the rebellion sparked by a fight between rival drug gangs.

Fontes told reporters several decapitated bodies were thrown over the prison wall, and most of those killed came from one gang.

“This was another chapter in the silent and ruthless war of drug trafficking,” he said.

Pedro Florencio, the Amazonas state prison secretary, said the massacre was a “revenge killing” in a feud between criminal gangs in Brazil.

The riot began late Sunday and was brought under control by around 7 a.m. AMT (1100 GMT) on Monday, Fontes said. Authorities were still counting prisoners to determine how many had escaped, he added, with reports that up to 300 fled.

Just as the riot began in one unit of the Anisio Jobim prison complex, dozens of prisoners in the second unit started a mass escape in what authorities said was a coordinated effort to distract guards.

AFP via Getty Images

Overcrowding is extremely common in Brazil’s prisons, which suffer endemic violence and what rights groups call medieval conditions with food scarce and cells so packed that prisoners have no space to lie down.

The Anisio Jobim prison complex currently houses 2,230 inmates despite having a capacity of only 590.

Hours after the Anisio Jobim prison revolt ended, prisoners at in an adjoining detention center began a riot and attempted to escape. Authorities said the situation was quickly brought under control.

Watchdog groups sharply criticize Brazil for its prisons where deadly riots routinely break out.

“These massacres occur almost daily in Brazil,” said Father Valdir Silveira, director of Pastoral Carceraria, a Catholic center that monitors prison conditions in Brazil. “Our prisons were built to annihilate, torture and kill.”

The violence was the latest clash between inmates aligned with the Sao Paulo-based First Capital Command (PCC) drug gang, Brazil’s most powerful, and a local Manaus criminal group known as the North Family.

The Manaus-based gang is widely believed to be attacking PCC inmates at the behest of the Rio de Janeiro-based Red Command (CV) drug gang, Brazil’s second largest.

Mario Tama via Getty Images A detainee walks in the Anisio Jobim penitentiary complex on June 24, 2015 in Manaus, Amazonas state, Brazil.

BROKEN TRUCE

Security analysts have said that a truce that held for years between the PCC and CV was broken last year, resulting in months of deadly prison battles between the gangs and sparking fears that chaos will spread to other prisons.

In the latest riot, a group of inmates exchanged gunfire with police and held 12 prison guards hostage late on Sunday in the largest prison in Manaus, an industrial city on the banks of the Amazon River, Globo TV reported.

Fontes said 74 prisoners were taken hostage during the riot, with some executed and some released.

A video posted on the website of the Manaus-based newspaper Em Tempo showed dozens of bloodied and mutilated bodies piled on the prison floor as other inmates milled about.

Sunday’s riot was the deadliest in years. A 1992 rebellion at the Carandiru prison in Sao Paulo state saw 111 inmates killed, nearly all of them by police retaking the jail.

Maria Canineu, director of Human Rights Watch for Brazil, said the most recent violence was the result of “no government in 20 years giving much attention to the penitentiary system.”

Canineu said that for years it has been difficult for states to receive any funding help from the federal government for prisons.

President Michel Temer announced last week that the federal government would furnish states with 1.2 billion reais ($366 million), mostly to improve infrastructure and security in existing prisons and to build new ones.

($1 = 3.2744 reais)