At least 57 people have been killed in a prison riot in Brazil which saw rival gangs battle for five hours, officials say.
Gang members from one prison block invaded another part of Altamira jail in Pará state.
Sixteen of the dead were decapitated and the remainder suffocated after part of the prison was set on fire, officials said at a news conference.
Two prison officers who were taken hostage have since been freed.
The violence began at about 07:00 local time (10:00 GMT) on Monday, and ended at around noon, officials said.
Members of the Comando Classe A (CCA) gang set fire to a cell where rival gang members from Comando Vermelho (Red Command) were kept, the Pará state government said in a statement.
The structure of the cell allowed the fire to spread quickly, resulting in the death by asphyxiation of some inmates.
Officials said that the two prison officers taken hostage were soon released, because the goal of the attack was to strike at the rival gang – rather than at the prison guards.
There had been no prior warning or signs of an impending attack on this scale, the statement said.
Video reported to be from the prison carried by Brazilian media showed smoke billowing from at least one prison building, while another clip appeared to show inmates walking around on the rooftops.
The prison in Altamira where Monday’s violence broke out has a capacity of 200, but was occupied by 309 prisoners. Officials denied it was overcrowded.
The Ministry of Justice said that ringleaders of the violence will be transferred to more secure units in federal jails.
Violence in Brazilian prisons is not uncommon. The country has the world’s third-largest prison population of some 700,000 people, and overcrowding is a widespread problem.
Clashes between rival gangs are frequent, as are riots.
In May, 40 people were killed on the same day in four different prisons in Manaus in Amazonas state – a day after 15 died in prison fights in the area.
More than 130 people were killed in January 2017 alone, as violence broke out in several prisons between the country’s two largest gangs, resulting in lengthy riots and the eventual transfer of hundreds of prisoners.
Brazil’s far-right President Jair Bolsonaro has vowed to bring in tighter controls in prisons, while building more across the country.
But this will not be straightforward as most prisons are controlled at the state level.