The latest prison riot in northern Brazil is thought to have killed more than 30 people, some of them beheaded, officials said Sunday, tripling an earlier estimated death toll.

"There are probably more than 30 dead" at the Alcacuz prison in the northeastern state of Rio Grande do Norte, police investigator Otacilio de Medeiros told reporters after leaving the jail.

The bloodbath that erupted on Saturday night was the latest of several gruesome gang-related massacres this year in the country's overcrowded prisons.

Source: b'The bloodbath was the latest of several gruesome gang-related massacres this year/ Source: AFP'

Another official earlier said at least three inmates were beheaded -- a feature of similar massacres in other jails at the start of this month.

Security forces stormed the prison at dawn on Sunday and restored order after 14 hours of violence, local authorities said.

Officials said members of two separate drug gangs had come out of different parts of the prison and clashed violently.

"There are at least three inmates dead because we were able to see their heads," state prisons manager Zemilton Silva told local media on Saturday.

Source: b'Corpses are being removed from the Alcacuz Penitentiary after the clash/ Source: AFP\xc2\xa0'

The prison, just outside the state capital Natal, is built for a maximum of 620 inmates but currently houses 1,083, the state justice department said.

Brazilian media said the riot was thought to be a clash between Brazil's biggest drug gang, the First Capital Command (PCC), and a group allied to its main rival Red Command.

Experts say the wave of violence is part of a war between drug gangs battling for control of one of the world's most important cocaine markets and trafficking routes.

Source: b"A priest talks to inmates' relatives outside the Alcacuz Penitentiary Center near northeastern Brazil/ Source: AFP"

The series of massacres in the first week of January left 100 prisoners dead -- many of them active members of gangs, authorities said.

The biggest bloodbath, in the northwestern city of Manaus, left about 60 dead. It appeared to be an orchestrated mass killing targeting members of the PCC.

It was thought to be a backlash by the PCC's rivals for its violent expansion.

(Feature image source: AFP)