RIO DE JANEIRO (AP) — Four inmates allegedly involved in deadly clash between prison gangs have died of asphyxiation while being transferred to a safer lockup, authorities said Wednesday, as families of victims began to bury their relatives.

The Para state public security office said the four were discovered dead when the prison vehicle arrived in the town of Maraba.

They said vehicle had four compartments and was carrying 30 handcuffed inmates who were suspected of involvement in Monday's clash gangs at the Altamira prison.

Authorities said the four who died were from the same gang and said they are investigating.

The prisoners were among 46 being sent to other prisons, including stricter federal ones.

Several holes had been dug in the rust-colored earth at the cemetery of Altamira, where grieving families began to arrive Wednesday to mourn some of the 58 inmates killed by a rival gang in a grisly prison riot.

"We need more security, we need more room (for detainees)," said Gelson Gusmao, whose son died in Monday's clashes. "There's a lot of overcrowding in the prisons, so we want our president to improve the situation inside."

Back at the forensic institute, dozens of grief-stricken, frustrated families were still waiting to identify slain relatives, fighting off the odor of decomposing bodies.

Only 21 bodies had been released to family members by Wednesday morning, a process slowed by the small size of the morgue, lack of staff to deal with the sudden flow of corpses and problems with lighting that meant staff can only work until 6:30 p.m.

In the Amazon heat, the bodies were being kept in a large refrigerated truck. But Brazilian newspaper Folha de S. Paulo reported that for lack of space, corpses were being kept under a makeshift, uncooled tent.

Forensic expert Marcel Ferreira said some passed out when called on the day before to identify the beheaded or burnt bodies of loved ones.

The forensic institute said at least six bodies would undergo DNA testing to be identified.

State officials said clashes erupted in Altamira early Monday when the local Comando Classe A gang attacked a wing of the prison holding members of the rival Comando Vermelho, or Red Command.

In many of Brazil's prisons, badly outnumbered guards struggle to retain control over an ever-growing population of inmates, with jailed gang leaders often able to run their criminal activities from behind bars.

Comando Classe A members allegedly set fire to the temporary containers where inmates belonging to Red Command were being held while construction of another wing was underway. Victims died of burns, asphyxiation and 16 had been decapitated.

"This is clearly a declaration of war on the Red Command," said Jean-François Deluchey, adjunct professor in political science at the Federal University of Para who has been studying the region for 20 years.

Authorities have not yet revealed the exact motive for the clash, only confirming that it was a fight between criminal groups. But several recent prison massacres have been attributed to gangs battling to control drug-trafficking routes in the multibillion-dollar Amazon drug trade.

In May, two days of unrest in the neighboring state of Amazonas left 55 prisoners dead in four different prisons of that state's capital, Manaus. In 2017, more than 120 inmates died in prisons across several northern states.

"It's the same logic, the same movement," Deluchey said. According to him, Red Command has a strong presence in the north and is trying to expand further in the region.

Deluchey said it is hard to confirm with certainty, but initial reports indicated that Comando Classe A, a local gang thought to have been created recently inside the Altamira prison, is linked to another powerful Brazilian gang, First Capital Command.

"The First Capital Command is losing grounds and it looks like Comando Classe A is helping them stop the hegemony of Red Command," he said.

The professor said he had already seen promises of retaliations by members of Red Command for Monday's attack.

Gruesome violence is often used in Brazilian prisons to gain respect and send a strong message to new arrivals, he said. "Violence is to impress, to frighten, so that new (inmates) join the side of those who decapitate, and not the decapitated."

The killings represent a challenge for the far-right administration of President Jair Bolsonaro. Bolsonaro ran a tough-on-crime campaign, promising to curb epidemic violence in Brazil, including in its overcrowded and out-of-control prisons.

The president publicly addressed the killings Tuesday in a video published on the online G1 news portal. Asked by journalists whether security should be strengthened at Altamira prison, Bolsonaro replied: "Ask the victims of those who died in there what they think."

Brazil has the world's third-largest prison population, behind the United States and China, with more than 720,000 individuals behind bars, according to official data from 2017. Some Brazilian prisons have more than three times as many inmates as their maximum capacity.

At Altamira, a local judge revealed in a July report examined by The Associated Press that he had counted 343 detainees in a facility authorized for a maximum of 163 people.

___

Associated Press journalist Raimundo Pacco in Altamira contributed to this report.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.