At least 56 inmates dead, many of them decapitated - results of a riot started on Sunday in an overcrowded prison in Manaus, Amazonas state of Brazil, officials say.
The unrest sparked after a fight between rival and gangs, reported CNN. The violence ended 17 hours later after the inmates surrendered their weapons and freed unharmed the last 12 guards taken as hostage.
With some 600,000 inmates and overcrowding is a serious problems, Brazil has the world's fourth-largest prison population. Anisio Jobim Penitentiary Centre, the biggest in Amazonas has the capacity for 454 inmates but it had 1,224 men, according to the report.
Six headless bodies were thrown over the perimeter fence when the riot began. Bloodied and burned bodies stacked in a concrete prison yard and piled in carts showed in pictures. Rival gangs who operating inside and outside prison, according to state public security secretary Sergio Fontes, had been fighting for control over drug trafficking.
He added that the violence appeared to be a message from Family of the North (FDN), a powerful local gang, to rivals from the First Capital Command (PCC), one of Brazil's largest gangs, whose base is in Sao Paulo, in the south-east.
The incident which appears to be the biggest massacre ever committed at a prison in the state, reportedly involved powerful groups which receive commands from their leaders based in the southern cities of Sao Paulo and Rio de Janeiro but whose deadly influence extends in jails throughout the country.
Local media reports in Manaus said that rival gang members, as is often the case, were brutally tortured after being taken hostage and some were decapitated before authorities could regain control.
The prisoners had almost no demands and their only request was not to be mistreated by the police when they came in, Fontes said to the local radio network Tiradentes when describing the negotiations to end the riot.
"We think they had already done what they wanted: kill members of the rival organisation and get a guarantee that they would not be beaten by the police. The FDN massacred suspected members of the PCC and other rivals."
He also said that the inmates got weapons through a hole in a prison wall and several firearms, as well as tunnels were found in the post-riot search by police.