With the fourth largest prison population in the world, Brazil struggles to keep a lid on simmering problems that include severe overcrowding, poorly trained guards and tense rivalries among competing drug gangs.
The tensions exploded into violence on Monday, when a fight between gangs broke out in a jail in the northeastern state of Ceara, triggering the latest in a series of riots that have shaken the Brazilian justice system in the last 13 months.
At least 10 inmates were killed and eight injured in the melee, which started around 8 a.m. at the Itapaje Public Jail. Guards ultimately brought the situation under control.
The jail, which is about 75 miles from the capital city of Fortaleza in the rural town of Itapaje, has a capacity of 25. There were 113 inmates squeezed into the facility when the fight took place.
According to the Penitentiary Council of the State of Ceara, the conflict between the rival gangs — the local Guardians of the State and Sao Paulo-based First Capital Command — ended in bloodshed because members of the two groups were held together in the jail, and not separated, as they are in larger prisons in the state.
The deaths in the jail are also thought to be in retaliation for a separate massacre, which left 14 dead in the early hours of Saturday morning. According to the Assn. of Public Safety Professionals of Ceara, 15 heavily armed men arrived in three vehicles at the Forro do Gago nightclub in Fortaleza, where they opened fire on the crowd. Photos shared on social media showed bodies strewn across the floor, mostly women. The secretary of public safety said two of the victims were minors.
The massacre is said to have been the most deadly in the state's history.
The Guardians of the State have since claimed responsibility for the attack on the nightclub, which is suspected of being related to a turf war for drug routes among the local gang, the First Capital Command and another, Rio de Janeiro-based gang.
One suspect was arrested Saturday and a rifle was seized. Police are still investigating.
The massacre at the Itapaje Public Jail was one of several problems in Ceara's lockup system on Monday. Three other public jails in the state registered escapes on the same day, including 10 from the Senator Pompeu Public Jail, where inmates made a hole in an exterior concrete wall and slipped out in the early hours of the morning. They have yet to be found.
The number of escapees in the towns of Caridade and Cascavel were not released.
Brazil's prison system has come under particular scrutiny in the last year, as several prison riots left dozens of detainees dead across the country. In the worst of those, a riot in a prison in the northwestern city of Manaus last January left 56 people dead.
The northeast has seen a particular jump in violence because of its location, a much-desired drug-trafficking route that would be profitable for all the gangs involved.
In Ceara, two of every three detainees are still awaiting trial, making it the state with the highest number of prisoners without a conviction in the country. The National Survey of Penitentiary Information, released by the Ministry of Justice this month, said that as of June 2016, 66% of detainees in the state had not yet been convicted of a crime. The national average was 40%.