A fire has swept through the female section of a crowded children's shelter near Guatemala City, killing at least 22 girls and leaving dozens more injured.
Distraught relatives waited outside the walled facility for news of their children.
Shelter personnel gave them pieces of paper to write down their children's names so they could try to locate them.
The head of Guatemala's social welfare agency, Carlos Rodas, said youths at the shelter started rioting on Tuesday in an effort to escape. Complaints about abuse and living conditions at the overcrowded shelter have been frequent.
Then on Wednesday, "some of the adolescents lit their mattresses on fire," Mr Rodas said. "We don't shirk responsibility, we accept it, but we can't get those lives back."
Julia Barrera, spokeswoman for the prosecutor's office, said at least 20 children and teenagers had perished.
Two hospitals said they received 41 injured girls between the ages of 13 and 17, many with second and third-degree burns. Dr Carlos Soto, director of Roosevelt Hospital, said some of the injured had life-threatening burns.
A short time later, Sharon Avila, spokeswoman for Roosevelt Hospital, said the 21st victim had died there. Later, the Hospital San Juan de Dios reported another death, raising the toll to 22.
Mr Rodas said the shelter had an official capacity of 500, but was housing at least 800 youths.
The federal government said in a statement that it had fired the shelter's director.
It also said that before the fire the government had asked that youths with criminal records housed at the shelter be moved to other facilities, but that had not occurred.
A 15-year-old girl being treated for minor injuries at Roosevelt Hospital said the uprising followed rumours of an escape attempt.
Some boys, or young men who were still housed at the centre after turning 18, entered the girls' area, she said. She said she fled to her dormitory's roof with others fearing the boys would attack them.
Early on Wednesday morning the fire began. "I saw the smoke in the place. It smelled like flesh," the girl said.
Mario Cruz, spokesman for volunteer firefighters, said the fire appeared to have started in one of the girls' living areas and spread to another dormitory.
The government-run shelter, known as the Virgin of the Assumption Safe Home, is in a rural area outside the capital.
The campus is surrounded by trees and a 30-foot wall. It houses at-risk children who were victims of abuse as well as youths who completed sentences at youth detention centers and had nowhere else to go.
President Jimmy Morales' office said there would be three days of mourning. The president held a moment of silence to mark the tragedy during a previously scheduled event to commemorate International Women's Day.