Around 60 people have been killed in a bloody prison riot sparked by a war between rival drug gangs in the Amazon jungle city of Manaus, officials have said, in some of the worst violence seen for years in Brazil’s overcrowded penitentiary system.

The head of security for Amazonas state, Sergio Fontes, told a news conference that the death toll could rise as authorities get a clearer idea of the scale of the rebellion.

Manaus' Em Tempo newspaper reported that several of the dead had their decapitated bodies thrown over the prison wall.

The riot began late Sunday and was brought under control by around 7am on Monday, Mr Fontes said. Authorities were still counting the prisoners to determine how many had escaped, he added.

International watchdog groups have sharply criticised Brazil for its prison system, where overcrowding is the norm and deadly riots routinely break out.

The massacre was the latest clash between inmates aligned with the Sao Paulo-based First Capital Command (PCC), Brazil’s most powerful drug gang, 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.

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.

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

A video posted on Em Tempo's website showed dozens of bloodied and mutilated bodies piled atop each other on the prison floor as other inmates milled about.

Brazil’s prison system is precariously overcrowded and conditions in many institutions are horrific, sparking a rash of deadly riots in recent years.

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