A New Year's Day prison riot in Brazil's Amazon riverport city of Manaus left up to 60 dead before aithorities re-established control the following morning—with many of the bodies decapitated, mutilated and burned. The uprising at the Anisio Jobim Penitentiary Complex (COMPAJ) is the bloodiest of several such episodes in recent years, pointing to extreme overcrowding in Brazil's prison system and effective control of many facilities by drug gangs. Authorities in Amazonas state say the COMPAJ rebellion was sparked by a fight between rival gangs. Local media reported that several of the dead had their decapitated bodies thrown over the prison wall. Twelve guards were taken hostage, and a still undetermined number of inmates escaped.

Brazilian news website Plus55 identifies the two gangs in question as the São Paulo-based First Capital Command (PCC) and the Family of the North (FDN), which controls the country's northern prisons and is said to be allied with PCC's major rival, Rio de Janeiro-based Comando Vermelho. These two factions were also involved in an October prison uprising in Roraima state that left 25 dead. The PCC and FDN also clashed in a spate of urban warfare in the streets of Manaus in July 2015, with 38 homicides reported over one weekend.

"One group is trying to eliminate the other so they can dominate the prison system," Marluce da Costa Sousa, coordinator of the Amazonas state branch of prisoner advocacy group Pastoral Carceraria, told Al Jazeera. "It's about profit."

The death toll in the COMPAJ uprising is the second highest in the bloody history of Brazilian prison violence. First place still goes to the October 1992 Carandiru prison massacre in São Paulo—in which police troops killed 111 prisoners in a half-hour shooting spree. The facility has since been closed, and 15 police officers finally received prison terms for the massacre in 2014.

With more than 600,000 inmates, Brazil has the fourth largest prison population in the world after the United States, China, and Russia. As in many other Latin American countries, this is in large part due to widespread use of pre-trial detention. Neighboring Bolivia has recently started to issue mass amnesties for low-level offenders in a bid to relieve the prison crisis.

Cross-post to High Times and Global Ganja Report