A bloody clash between two prison gangs in a Brazilian detention facility on Monday left at least 57 inmates dead with 16 of them decapitated.

Online videos from the latest deadly prison gangs clash which comes as Brazil’s government struggles to control the country’s overcrowded jails showed inmates at the prison celebrating as they kicked decapitated heads across the floor.

Having been elected on the back of a tough-on-crime message, President Jair Bolsonaro has benefited from a sharp drop in homicides so far this year.

Nonetheless, endemic prison violence has been a stubborn public security challenge in one of the world’s most violent countries.

In May, at least 55 inmates were killed during prison attacks in the northern state of Amazonas. Weeks of violence in Amazonas in 2017 also resulted in 150 prison deaths as local gangs backed by two of Brazil’s  largest drug factions went to war.

In a statement, the country’s Justice Ministry said it was working with prison authorities to identify those behind the latest attack, adding that it had opened some space in the federal prison system where gang leaders would be transferred. 

Brazil’s incarcerated population has surged eight-fold in three decades to around 750,000 inmates, the world’s third-highest tally.

Prison gangs, which were originally formed to protect inmates and advocate for better conditions have in recent years come to wield vast powers, extending beyond prison walls.

The gangs have often been linked to bank heists, drug trafficking and gun-running, with jailed kingpins presiding over criminal empires via smuggled cellphones.