Family members waited for information after a fire at the Virgen de la Asunción home on the outskirts of Guatemala City. CreditSaul Martinez/Reuters

GUATEMALA CITY — Long before Wednesday’s devastating fire claimed the lives of at least 21 young people, the Virgen de la Asunción home for children was hardly a sanctuary. It was instead known for further damaging the broken lives within its walls.

The 750 residents crammed into the aging structures were nearly all victims of abandonment and abuse and had been removed from families and guardians by the authorities for their own safety.

But they found little respite at the state home, and in some cases more of what they fled. Members of the staff sexually abused residents, prompting criminal cases and a series of complaints with the country’s human rights commission, which had requested a judicial order to close the facility down a month ago.

On Wednesday evening, volunteer ambulance crews took the bodies of dead children from the scene of the fire, which also injured at least 40.

The president of Guatemala, Jimmy Morales, called for three days of national mourning and ordered all public activities canceled.

The home quickly became a flash point of national tragedy. Family members of those trapped in the fire mourned from behind police cordons. A social worker came to the door of the home every 20 minutes to read a list of children who were safe. Those children were being delivered to the relatives who waited outside.

“I brought her because she doesn’t follow my orders to do housework and because she was starting to go out on the streets, and I did not want to lose her,” Marta Lidia García, 39, said of her 17-year-old daughter. “She told me that they treated her badly and gave them food with worms and that the cops who take care of them sometimes bother them.”

What caused the fire, and why, remains the subject of investigation. Just two of the home’s seven buildings were destroyed by the blaze, investigators said, which early reports suggest may have been caused by a resident who set her mattress on fire.

The authorities said that the day before the fire, riot police were sent in to quell a disturbance at the home near Guatemala City, where nearly 750 youngsters lived in a space meant for 500. The disturbance is believed to have started when some of the residents clashed with staff in an attempt to escape, prompting employees to call the authorities.

“The police treated the kids like adults after a ‘kind of mutiny,’ ” said Hilda Morales, the deputy attorney general of the human rights ombudsman.

Escapes are a common occurrence at the home. Last year, 142 children tried to break out, and only one-third were recovered. In Tuesday’s attempt, the authorities said 40 children managed to flee.

Guatemala holds the dubious distinction of having Latin America’s highest child malnutrition rates. The nation is plagued by crime, violence, corruption and poverty, and its public institutions bear the scars of that heritage.

The home was supposed to provide a refuge, but residents faced dangers there, too. A workman, Arias Pérez, was found guilty of raping a teenage girl with mental disabilities in 2013. Dieguez Ispache, a former teacher, is awaiting trial on charges of aggravated sexual assault.

The residents victimized one another, too. In 2014, a girl was found dead, hung by her own scarf. Two teenagers were later charged with homicide.

Still, both the Congressional Commission on Children and the nation’s human rights body petitioned the courts to close the home, but the facility stayed open.

“We are going to issue a public censure, but above all that the Virgen de la Asunción home, in compliance with the judicial order from several months ago, will be closed,” Mrs. Morales said.

Categorized in: