State public security secretary Sergio Fontes said that in addition to the deaths, some inmates escaped, but he did not say how many. Several prison guards were held hostage.
"This is the biggest prison massacre in our state's history," Fontes said during a press conference.
The riot began yesterday in the afternoon and lasted until this morning.
Two of the biggest crime gangs of Brazil began fighting last year over control of several prisons and authorities in Amazonas believe that's the reason behind the first riot of 2017.
Also Read
The secretary said officers found a hole in a prison wall through which authorities believe weapons entered the building.
Fontes confirmed that many of the dead had been beheaded and Judge Luis Carlos Valois, who negotiated the end of the riot with inmates, said he saw many bodies that were quartered.
"I never saw anything like that in my life. All those bodies, the blood," Valois wrote on Facebook.
The riot ended after the inmates freed the last of the 12 prison staffers they had held hostage, Valois said.
In another prison in Amazonas, 87 inmates escaped in the first hours today, Fonte said.
One of the inmates posted a picture on Facebook as he left the prison.
Disclaimer: No Business Standard Journalist was involved in creation of this content