Manaus, Brazil - It was early evening on January 1, 2017, when Maria heard that a riot was under way at Complexo Penitenciario Anisio Jobim (COMPAJ) - the prison where her two sons Antony, 27, and Antonio, 22, were being held.

Maria - an alias she requested for security reasons - spoke to Al Jazeera from her small red brick home in a poor Manaus neighbourhood.

Her son Antonio had been sent to the prison in September, his third sentence for stealing motorbikes. He entered as a marked man, having supposedly informed on someone when he was arrested.

Antonio asked to be put on the secure wing, the section of the prison which houses prisoners, such as those convicted of sexual crimes, former police officers and rivals of dominant prison gangs, who are deemed at risk from other inmates.

Antonio called his mother every day, using an illicit mobile phone. "He said that guys kept promising to kill him," she said.

READ MORE: Dozens killed in prison riot in Brazil city of Manaus

Antony, Maria's older son, convicted of drug trafficking and criminal association, ended up being transferred to COMPAJ from another prison a few days before Christmas. He asked to stay with his brother in the secure wing. "It was the first time they had seen each other in about five years because they had both been in and out of jail at different times," said Maria.

Antonio shared the wing with Moacir "Moa" Jorge Pessoa da Costa, a former policeman convicted of homicide who became a local celebrity in 2009 when he claimed that he was contracted by a state legislator - Wallace Souza - to execute drug dealers to boost TV ratings for a popular TV crime show Souza presented.



Al Jazeera visited Moa's wife at her home but she didn't want to speak on record.

Also in the secure wing was Jackson de Oliveira Avelino, 25, who was three years into a 15-year sentence for murder and disposal of a body.

"He was a good boy," his mother Marlene said. "But he took drugs - cocaine - and got involved with the wrong people. They forced him to take part in the crime." Jackson was transferred to the secure wing after he was savagely beaten by a group of inmates who accused him of being a snitch because he received a shorter sentence for his crime.

Marlene visited him each week. He told her that he was being threatened, that people were passing in front of his cell in the secure wing and saying "Your time is coming" as they made throat-cutting gestures.

"He said 'Mum, there is going to be a rebellion'," Marlene recalled. "I asked him, 'Do you believe in God?' He said 'I do mum, but here it's not about God, it's about survival'."

The prisoners held a party on New Year's Eve. Marlene said that she and her husband paid a prostitute to visit their son Jackson inside. "They were having fun, drinking and taking photos," said Marlene.

The next day, at around 4pm, inmates from Manaus's dominant drug trafficking group Family of the North (FDN) - which controls the prison - attacked the secure wing, where the inmates from a rival gang, the Sao Paulo-based First Command of the Capital (PCC), which has been encroaching on the former's territory, were held.

The FDN prisoners stormed the secure wing with guns and machetes, filming the slaughter on mobile phones.

"We knew they were dead when we saw the videos," said Maria, referring to the images of beheaded and dismembered corpses that circulated that night on social media and local news sites.

READ MORE: Manaus residents live in fear after prison breaks

The violence lasted 17 hours. Marlene's son Jackson was decapitated. Maria's son Antony had his throat cut and Antonio was beheaded.



Having served a third of his sentence, Antonio had received permission to be transferred to a different, semi-open part of the prison. The transfer would have saved his life, but the prison authorities didn't act in time.



"When you are poor and you can't afford lawyers, these people [the authorities], they treat you like dirt," Maria said.

After the killings, Manaus street hawkers sold DVDs entitled 'FDN v PCC - the massacre', a compilation of the video footage shot during the slaughter.

Altogether 56 prisoners were killed in the riot. It was Brazil's worst prison massacre since Carandiru in Sao Paulo in 1992, when the military police killed 111 prisoners.

The riot was part of a wider wave of prison violence: more than 130 Brazilian prisoners have been killed since the beginning of this year - many decapitated, dismembered or burned - in a series of uprisings that have shocked a country long accustomed to this kind of violence. In 2016, 379 inmates were killed.

Experts say that the prison killings reflect decades of failed policy; the prison population has soared beyond the control of a chronically underfunded system, enabling gangs to step in and take the place of the state.

The upsurge in violence is also attributed to growing tensions between gangs fighting for control of the cocaine trade.

Following the prison violence, hopes have been spurred for prison reform and a rethink on drug decriminalisation - outcomes considered essential by some experts to prevent further bloodshed.

READ MORE: Brazil to transfer gang leaders after prison massacre

Brazil's prison problem

Each day, dozens of relatives line up outside COMPAJ prison to deliver fresh clothes, hygiene products and food to the inmates - all of which are supposed to be provided by the state.

Families complain of prisoners being served rotten, barely edible food.

"It was me who took care of him, I did everything, the state did nothing," said Marlene.

Marlene and the other families of those killed in the riots will receive compensation of BRL 50,000 Brazilian real (roughly $16,000) for each victim, a move criticised by conservative Brazilian politicians.

That some kind of violence was imminent was seemingly known to the authorities. In 2015, federal police intercepted text messages that appeared to be planning an attack, shortly after three PCC leaders were killed.

A United Nations special task force visited prisons and sent a report to the government months before, warning that the prison was out of the state's control and in the hands of the gangs.

Other prisoners sent letters to the authorities saying that they were being threatened.

READ MORE: Brazil: Dozens more killed as prison gang war escalates

"Despite the constant warnings, the prison simply did not have the structure to prevent an eventual outbreak of violence," said Rafael Custodio, the justice programme coordinator at Conectas - an international human rights NGO.

The private prison contractor Umanizzare - Italian for "humanise" - that administers COMPAJ jail is currently being investigated for overbilling and the misuse of public money.

Al Jazeera was unable to access COMPAJ jail. At the time of the massacre, the prison was severely overcrowded with 1,224 prisoners. The prison is supposed to hold 454.

Marlene said that her son Jackson shared his cell with 20 others.

According to the Justice Department, Brazil houses about 650,000 prisoners in just 300,000 spaces, with the prison population having grown by 270 percent between 2000 and 2014.

Brazil's prison population is now the world's fourth-largest behind the US, China and Russia.

About 40 percent of prisoners are awaiting trial. The majority are poor young black men with little education and who cannot afford lawyers.

READ MORE: Dozens killed and wounded in Alcacuz prison riot

Nonetheless, mass incarceration policies are popular with Brazil's electorate; tough measures on crime win votes in a country with more than 50,000 murders a year.

"In general, public opinion supports mass incarceration and the politicians are just surfing this wave," said Ilona Szabo de Carvalho, cofounder and executive director of the Igarape Institute, which campaigns for prison and drug reform. There is also widespread tolerance for the poor conditions, Carvalho added.

But experts say that terrible conditions in prison reinforce the strength of the gangs, who control the majority of Brazilian jails.

In general, public opinion supports mass incarceration and the politicians are just surfing this wave Ilona Szabo de Carvalho, cofounder and executive director Igarape Institute

Upon entry, young men from poor communities are courted by gangs who can provide protection and benefits such as better food, hygiene products, mobile phones and support to families on the outside.

"People that enter are vulnerable to gangs because the state doesn't have any power inside, it's the gangs that decide," said Manaus judge Luis Carlos Valois, who negotiated the end of the COMPAJ riot. "You may have four guards and 1,000 prisoners. It's a question of survival."

Following the massacres, the government launched a National Security Plan, which will see more prisons built over the next few years, as well as special custodial task forces set up to deal with the huge number of pre-trial detainees, and measures to tackle overcrowding. Non-violent prisoners could be released or granted lesser penalties, such as wearing an electronic ankle tag.

Judge Valois expressed criticism of these measures. "We have to deal with the sheer numbers of prisoners that we are arresting, we need to arrest fewer," he said. "This has to start with a reform of the drug law."

Prominent figures, including an ex-president and a Supreme Court judge, have called for the decriminalisation of drugs.

A 2006 drug law that fails to discriminate between user and dealer is cited as one of the main factors behind the prison population increase. Today, just under a third of inmates are inside for drugs offences - a 340 percent increase since 2005.

But any kind of drug reform is likely to encounter resistance within Brazil's conservative Congress, home to a powerful Evangelical Christian caucus, where there are currently 14 proposed projects to make drug laws even tougher.

For the Igapare Institute's Szabo de Carvalho, however, any discussion of drug decriminalisation is a step in the right direction, even if initially voted down in Congress.

"We had a horror show in January, if we forget what happened; we are going to go back to that in a few months," she said.

A war with no end

A hard line on drug enforcement has done nothing to stem an explosion in gang violence in Manaus, which in turn fuels prison bloodshed.

On a Monday morning, Manaus reporters and photographers gathered at a crime scene waiting for an official line from chief homicide detective Torquato Mozer.

Earlier that morning, a motorcycle taxi driver had found two black sacks by the side of the road. One contained a young man's head, the other his limbs and torso.

Mozer said that an investigation would be launched as to whether the crime had any connection to the massacre at COMPAJ jail.

"Given the barbarity of the crime, we cannot rule out this possibility," Mozer told Al Jazeera at the scene.

A war for control of drugs rages in Manaus, the capital of Brazil's Amazonas state, which shares borders with cocaine producing countries Colombia and Peru, making it an important transit point as well as a place with its own lucrative market.

"Every corner here, there are drugs," said Marlene.

In the past decade, Brazil has become the world's second-largest consumer of cocaine.

READ MORE: 56 killed, many beheaded, in grisly Brazil prison riot

Al Jazeera spoke to Sergio Fontes, Amazonas state security chief, at his office located in the basement of a Manaus shopping centre.

He mentioned a range of ideas to counter the drug trade, such as sanctions against drug-producing countries that refuse to eliminate coca crops, as well as state drug provision programmes for addicts.

"When I see cracolandias [open air crack cocaine markets], I think - why doesn't the state give drugs to them? They wouldn't need to rob, to prostitute," he said. "Canada did this with heroin."

Ultimately, however, Fontes said that his only possible course of action for the meantime was to carry on with drug repression, even if it led to more violence.

Amazonas is Brazil's fourth-poorest state, leaving it more vulnerable to the violence and corruption associated with drug trafficking than rich states such as Sao Paulo.

The FDN drug gang, which controls most of the local drug trade, formed about 10 years ago when Manaus criminals joined forces to resist the encroaching Sao Paulo PCC group.

A federal police investigation revealed the close links between state authorities and the FDN, with a meeting between then Under Secretary of Justice Major Carliomar Barros Brandao and FDN leader Jose Roberto Fernandes Barbosa at the COMPAJ jail.

Barbosa allegedly promised 100,000 votes for the re-election of Governor Jose Melo, for which Brandao promised that no one would "mess with" the gang. Melo and Brandao have denied this claim.

Security experts say that the recent prison violence relates to a rupture between Sao Paulo's PCC and Rio de Janeiro's "Red Command" gang - who held a truce for nearly 20 years - following the killing of a major Paraguayan drug wholesaler on the Brazil border, consolidating the PCC's power in the region.

Initially, the war began at the end of 2016 with killings inside prisons in the north of the country that were attributed to the PCC.

According to security experts, Manaus' FDN - who are allied, but not subordinate to Rio's Red Command - committed the New Year's Day Manaus killings in revenge for the Rio group.

In a Brazilian funk track released days after the massacre, FDN pays homage to the killings and confirm their alliance with the Red Command.

"These local factions have joined with the Red Command to resist the advance of the PCC because they know they can't do it alone," said Lincoln Gakiya, a Sao Paulo-based prosecutor who has been investigating the PCC for 10 years.

The PCC formed in Sao Paulo's prison system during the 1990s and is today considered to be Brazil's most powerful criminal organisation, with a membership of about 22,000 and a presence in almost all Brazilian states as well as neighbouring countries, according to Gakiya.

The group's most important leaders are imprisoned and today the group has a strong presence in 90 percent of the jails in Sao Paulo state. The PCC already dominates trafficking routes around Brazil's southern borders with Bolivia and Paraguay, and they have greater ambitions.

The Amazonian drug trafficking routes are of particular interest to the group because the region is so open and undermanned by police, and cocaine from Colombia and Peru is of a superior quality to that of Bolivia.

"But there is resistance from the local crime groups," said Gakiya. "Therefore, it's a war that has no end in sight."