Guatemala has declared three days of national mourning after a fire killed 31 teenage girls at a children's care home.
Wednesday's blaze at the government-run Virgen de Asuncion shelter in San Jose Pinula, near Guatemala City, has focused attention on how it was run.
Police say some residents set fire to mattresses after a riot and an escape attempt.
There have been allegations of abuse at the overcrowded centre.
Nineteen girls aged 14 to 17 were reported to have died at the scene, and more have died in hospital since.
Around 40 people were taken to hospital with second- and third-degree burns, according to hospital officials.
President Jimmy Morales declared the country to be in official mourning. His office said the cause of the fire was being investigated.
The tragedy was "a great shame for the state and for the whole world", Supreme Court Magistrate Maria Eugenia Morales told reporters.
Distraught relatives of the residents waited at two local hospitals and the morgue for news.
Some of the victims were hard to identify because the bodies were so badly burnt, and authorities said DNA tests would have to be conducted.
Reports say the capacity of the home is 400, but that many more children were living there at the time.
Hundreds of children escaped the fire, but many are not yet accounted for.
A group of youths isolated by authorities after the riot caused the blaze by setting fire to mattresses, police chief Nery Ramos said.
Firefighters said it appeared to have started in the female section of the shelter.
Guatemalan media report that the riot erupted as a result of alleged sexual abuse by staff and frustration with the poor conditions and food.
"It was a ticking time bomb. This was to be expected," a former employee, Angel Cardenas, told the AFP news agency.
Open-living arrangements meant that "girls who simply were suffering, that didn't have any problems with the law, are mixed with young people who have committed crimes", presidential spokesman Heinz Heimann said.
"This can't be allowed to continue."
The fire ripped through the facility in minutes.
The shelter, run by the social welfare ministry, takes in children up to the age of 18 who have suffered abuse or have been abandoned.
But local media say the shelter was also functioning as a juvenile detention centre, to which judges were sending adolescents involved in criminal cases.
The UN children's fund in Guatemala said on Twitter it "condemns the tragedy", adding: "These children and adolescents must be protected".