A prison riot has left at least 56 people dead, with decapitated bodies thrown over prison walls in the bloodiest violence in more than two decades in Brazil's overcrowded penitentiary system, officials in the Amazon city of Manaus said on Monday. The head of security for Amazonas state, Sergio Fontes, earlier said the death toll could rise as authorities got a clearer idea of the scale of the violence. He said the riot began late on Sunday and was brought under control by around 7am on Monday. Authorities were counting the prisoners to determine how many had escaped. It was the latest in a series of clashes between prisoners aligned with the São 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 prisoners at the behest of the Rio de Janeiro-based Red Command (CV), Brazil's second largest drug gang. Security analysts have said a truce that held for years between the PCC and CV was broken last year. In the latest riot, a group of prisoners exchanged gunfire with police and held 12 guards hostage, Globo TV reported. Fontes said 74 prisoners were taken hostage during the riot, some of whom were killed and some released. Em Tempo newspaper reported that several decapitated bodies were thrown over the prison wall. A video posted on the newspaper's website showed dozens of bloodied and mutilated bodies piled on top of each other on the prison floor as other prisoners milled about. Brazil's prison system is precariously overcrowded and conditions in many institutions are horrific. Sunday's riot was the deadliest in years. In 1992, 111 prisoners were killed at Carandiru prison in São Paulo state, nearly all of them by police as they retook the jail.