The fighting was sparked by a war between rival drug gangs in the Amazon jungle city of Manaus.
Officials say the death toll could rise as authorities get a clearer idea of the scale of the rebellion.
What happened?
The riot began late on Sunday.
BRAZIL PRISON - Dozens reported killed in prison riot in Brazil https://t.co/NfjEYgPi7W
— WORLD NEWS (@WorldNews7777) 2 gennaio 2017
A group of inmates exchanged gunfire with police and held 12 prison guards hostage late on Sunday in the prison.
It is the largest in Manaus, an industrial city on the banks of the Amazon River.
74 prisoners were reportedly taken hostage during the riot. Some were executed and some released.
The riot was brought under control by 7 am on Monday.
The authorities are still counting the prisoners to determine how many have escaped.
Decapitated bodies “thrown over wall”
Video footage is said to show dozens of bloodied and mutilated bodies piled on top of one another on the prison floor.
The Manaus’ Em Tempo newspaper reports that the decapitated bodies of several of the dead were thrown over the prison perimeter wall.
Turf wars
Dozens killed in gang violence at Brazilian jail https://t.co/6upuDTFlTo
— Guardian World (@guardianworld) 2 gennaio 2017
The prison massacre was the latest clash between inmates aligned with Brazil’s most powerful drug gang, the Sao Paulo-based First Capital Command (PCC) and a local Manaus crime group known as the North Family (CV).
Security analysts say a truce that held for years between the PCC and CV broke down last year.
This resulted in months of deadly prison battles between gangs.
Brazil’s overcrowded prisons
International watchdog groups sharply criticise Brazil for its prison system.
Conditions in many of the country’s institutions are described as “horrific”, with overcrowding said to be the norm and where riots routinely break out.
Sunday’s riot was the deadliest in years.
111 inmates died in a 1992 rebellion at the Carandiru prison in Sao Paulo state. Nearly all were killed by police as they stormed the jail. (Euronews)