SAN JOSE PINULA, Guatemala -- A blaze that killed at least 34 girls at a shelter for troubled youths erupted when some of them set fire to mattresses to protest rapes and other mistreatment at the badly overcrowded institution, the parent of one victim said Thursday.

Officials said they are still investigating who started the fire Wednesday at the long-criticized shelter on the outskirts of Guatemala’s capital. It houses troubled and abused boys and girls as well as juvenile offenders.

Nineteen victims were found dead at the scene, and 15 more succumbed one by one to their grisly injuries at hospitals in Guatemala City. Several more girls were fighting for their lives, some with severe burns over more than half their bodies.

Get Breaking News Delivered to Your Inbox

The inferno grew out of a mass escape attempt. Dozens of teens held in an overcrowded state-run shelter on the outskirts of Guatemala’s capital flooded through the gates 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 youth who had completed sentences at juvenile detention centers.

Relatives wait outside the children’s shelter Virgen de la Asuncion after a fire at the facility killed at least 31 people, in San Jose Pinula, east of Guatemala City, March 8, 2017. Getty

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 teen was pregnant and had been at the shelter for nine days because she ran away from home.

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,” Estrada said. “I blame the state for what has happened.”

Late 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.

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, some partially naked, burned bright pink with large flaps of skin hanging from their bodies.

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 30-foot 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,” 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.