Riot police in Guatemala have entered a youth detention centre and rescued four hostages from rioting inmates.
One of the four guards rescued has died and two others are seriously injured.
The inmates took control of the compound after family visiting hours on Sunday, killing two guards and shooting another one.
Officials say the Etapa II centre in the capital, Guatemala City, is controlled by the notorious 18th Street Gang, active across Central America.
The inmates set mattresses alight and climbed the roof of the detention centre on Sunday. Some tried to escape.
Among their demands was that fellow gang members held at other jails be transferred to Etapa II.
They also want the right to cook their own meals or to have food brought in from outside.
Witnesses said inmates from the 18th Street Gang threatened to kill members of rival gang Paisas if they refused to take part in the riot.
Members of violent street gangs make up the bulk of Guatemala’s prison population and deadly conflict inside prison walls is not uncommon.
The incident comes less than two weeks after 40 girls died in a fire at a state-run children’s shelter, also near Guatemala City.
That fire, too, is believed to have started when a mattress was set alight.
The two cases have highlighted the poor state of children’s and youth services in Guatemala, activists say.