The authorities, who had been trying to negotiate an end to the prison rebellion, sprayed water inside to stop the blaze.
They later found 25 charred bodies in the cell.
Autopsies were being conducted to determine whether the victims died from their burns, smoke inhalation or both.
Brutal prison violence and rebellions are common in Brazil's overcrowded jails, where gangs often exert more control than their wardens and manage criminal enterprises outside with smuggled cell phones inside.