The death toll from a fire at a troubled youth shelter in Guatemala has risen to 31 as a dozen more girls died at hospitals overnight.
Details began to emerge of a tragedy fuelled by angry, neglected youths seeking to flee terrible conditions.
Nineteen girls were found burned to death in the rubble of a dormitory fire fuelled by foam mattresses on Wednesday.
Twelve of the 39 residents injured later died at hospitals, said Adrian Chavez, the assistant health minister.
Of the 27 girls still in hospital, 10 are in critical condition with life-threatening burn injuries, often covering more than 50% of their bodies.
The inferno grew out of a mass escape attempt.
Dozens of teenagers held in an overcrowded state-run shelter on the outskirts of Guatemala's capital flooded through the gates on Tuesday evening, most only to be caught and locked down in their dorms.
On Wednesday morning someone set fire to mattresses in the girls' section of the rural campus, authorities said.
The blaze quickly spread through two dorms.
Distraught parents waited outside hospitals and the shelter, a state-run facility that accepted abused, neglected or homeless children, but also housed youths who had completed sentences at juvenile detention centres.
Parents scribbled their children's names on pieces of paper to pass to shelter staff begging for information. They went to the two local hospitals and the morgue.
Authorities worked to identify victims, but said DNA tests might be necessary for some remains.
At Roosevelt Hospital, Dr Marco Antonio Barrientos asked parents waiting outside for information to come back with photographs, dental records and details about tattoos or other distinctive features.
Piedad Estrada, a street vendor, arrived at the hospital with a photograph of her 16-year-old daughter.
She said the teenager was pregnant and had been at the shelter for nine days because she ran away from home.
Ms Estrada searched at the hospitals and the morgue, but got no information.
She showed the photo to workers at one hospital, but they said they had five girls who were completely bandaged so they could not be sure.
"They only took her from me to burn her," Ms Estrada said. "I blame the state for what has happened."
Late on Wednesday at the morgue, Patricia Ramirez said her 15-year-old granddaughter Achly Gabriela Mendez Ramirez was one of the dead.
She said her daughter, the girl's mother, had identified Achly's burned body at the shelter earlier in the day, but authorities said they would not release her body until there was a DNA test.
Ms Ramirez said the family was from a region east of the capital in Jutiapa department and Achly had been at the home for one year.
Ambulances had hurried to the hospitals throughout the morning carrying the injured.
A 15-year-old girl being treated for minor injuries at Roosevelt Hospital said she and other girls had sought refuge on the roof of their dorm after the disturbances began, fearful of being attacked by other youths.
By morning she said she could see the fire in a nearby building.
"I saw the smoke in the place. It smelled like flesh," the girl said.
Hours after the fire, the government in a statement expressed its condolences to the victims' families and promised a thorough investigation.
It said that before the incident it had asked that the shelter transfer youths with criminal histories who were there on judges' orders to other facilities, but that had not happened.
It said the director had been fired.
Surrounded by trees and a 30ft wall, the Virgin of the Assumption Safe Home was built to hold 500 young residents, but at the time of the fire housed at least 800.
The residents were a mix of children in protective custody who had been victims of abuse as well as older youths with criminal records who had served their sentences but had nowhere else to go.
Complaints about abuse and living conditions at the overcrowded shelter have been frequent.
Jorge de Leon, Guatemala's human rights prosecutor, said in a statement that at least 102 children had been located after escaping from the shelter but more had managed to flee.
He said younger children fled the shelter because they were being abused by older residents.
"According to what they say, the bigger kids have control and they attack them constantly," Mr de Leon wrote.
"They also complain that food is scarce and of poor quality."
In 2013, a 14-year-old girl was murdered at the facility.
Investigators said the girl was strangled by one of the other residents.