The Brazilian government is to transfer gang bosses from a prison in the jungle city of Manaus where the country's deadliest jail riot in decades erupted on Sunday, leaving 56 dead.

Justice Minister Alexandre de Moraes said authorities would immediately begin to identify and transfer the gang bosses from the Anisio Jobim jail, which is the largest in the northern Amazonas state, reported Reuters.

The riot broke out on Sunday night, when members of the local North Family gang attacked members of a rival crime gang, taking dozens of inmates and several prison guards hostage.

Local media reported that rioters dumped the decapitated bodies of prisoners over a perimeter fence, and footage obtained by Manaus' Em Tempo newspaper showed bodies and dismembered limbs piled on top of each other in the prison as rioters milled around.

Police are hunting around 100 inmates who escaped the jail during the riot, which was quelled on Monday morning.

Seventy two inmates also escaped the state's Antonio Trindade prison on Sunday, with robbery convict Brayan Bremer bragging of his escape on Facebook.

Brazil has the fourth highest number of prisoners in the world, with riots frequently breaking out in overcrowded and filthy prisons. Anisio Jobim prison reportedly holds three times as many prisoners as it was built for in 1982.

The riot was the deadliest since the 1992 rebellion at the Carandiru prison in Sao Paulo state in which 111 inmates were killed, many by police as they seized back control of the facility.

Prisoners will be transferred from several other prisons to an empty jail in Manaus amid fears the massacre could spark retaliatory attacks.