The prison at Manaus.

More information Un motín en una cárcel de Brasil deja más de 50 muertos

Photographs and videos taken at the Anísio Jobim prison showing piles of bodies, many of them hacked to pieces, have been posted on social networks. In one, a hand is holding the heart of a decapitated prisoner.

The riot began on Sunday afternoon and was not brought under control until Monday morning. Sergio Fontes, the secretary of public security for Amazonas state, told the media that fighting broke out between two rival gangs: the Primeiro Comando da Capital, known as the PCC, from São Paulo, and the Família do Norte, or FDN, from Amazonas. On Sunday night, six prisoners were decapitated and their bodies thrown into the prison yard. At least 12 guards were taken hostage, but were later released as part of the negotiations.

Grisly images of decapitated bodies have been posted on social networks

Brazil’s northwest is a major entry point for cocaine produced in Peru, Colombia and Venezuela, which all border with Amazonas. Control of the region’s prisons is key to running the drugs trade there. The jail complex in Manaus holds 1,072 prisoners and is the largest in the state. It is dominated by the FDN.

The overwhelming majority of those killed in the riot belonged to the PCC. The situation has been tense in jails throughout the north of Brazil since October, when the PCC broke with the Comando Vermelho, a Rio de Janeiro-based gang allied to the Família do Norte. Three PCC leaders were murdered between June and July 2015 in prisons on the orders of the FDN.

In October 2016, the PCC retaliated by killing 18 Comando Vermelho gang members in jails in Roraima and Acre states. The slaughter in Manaos is being seen as the latest episode in the ongoing war to control the drug trade in northern Brazil.

The authorities suspect a nearby jailbreak was used to divert their attention

The PCC has taken control of some of the most important drugs and weapons routes in the north of Brazil. It is responsible for the main cocaine shipments entering the country from Colombia and Bolivia, along with marijuana from Paraguay. The Comando Vermelho has been losing control of these routes following the arrest of Fernandinho Beira-Mar in Colombia in 2001 while he was attempting to negotiate deals to buy cocaine from the Revolutionary Armed Forces of Colombia (FARC).

This is the second-deadliest prison riot in Brazil’s history. In 1992, violence at the Carandiru jail in São Paulo left 111 dead.

The authorities in Manaus said that a jailbreak nearby was used to distract their attention.

PCC prisoners are kept apart from the rest of the jail population in a secure area. Documents obtained by EL PAÍS show that one of the gang’s leaders, José Roberto Fernandes Barbosa, negotiated with the authorities to allow PCC prisoners out of their secure area in return for an end to its campaign of violence. No agreement was reportedly reached.