Five people were killed and 11 injured in a clash between two groups of inmates in a Brazilian jail, authorities said.
Three of those killed were burned to death while two others died of blows suffered in the melee in the Parana prison, an official statement said on Saturday.
The clash, which involved roughly 1,200 of the prison's 1,600 inmates, was sparked off Thursday with a fight between inmates belonging to two rival gangs, who were being held in the same wing of the penitentiary, the state government said.
Military police intervened and managed to free three prison guards who had also been taken hostage during the upheaval and suffered minor injuries.
According to media reports, authorities were planning to transfer the inmates to other facilities because almost 90 per cent of the cells were destroyed.
A congressional report in 2008 described Brazil's prison system as an "inferno", where human rights were being systematically violated and some 400,000 inmates were packed into jails designed to hold only 260,000.
The lawmaker who presented the report, Domingos Dutra, said leaders of gangs operating both inside and outside prison walls were the "managers" of those facilities together with corrupt guards.
The report said that the government was failing to guarantee prisoners access to legal counsel and estimated that close to 30 per cent of inmates would have been free if they had attorneys to represent them.