A 15-year-old schoolgirl from Guyana was charged as an adult Monday in the murder of 19 people after police accused her of purposefully setting fire to a school dormitory in retaliation for her cellphone being confiscated.

The fire killed 18 of her schoolmates and a 5-year-old boy trapped inside the building after a dorm matron locked the doors from the inside to prevent the female students, aged 12-18, from sneaking out to socialize with males from a nearby mining town.

How the fire was started has not yet been made clear.

Guyana's Department of Public Information

The burned remains of a dormitory are shown at a secondary school in Mahdia, Guyana, on May 22, 2023. A nighttime fire raced through the dormitory, killing at least 19 students and injuring several others, authorities said. (Guyana's Department of Public Information via AP Photo)

AT LEAST 20 STUDENTS KILLED IN GUYANA DORMITORY FIRE

A court south of the capital of Georgetown ordered that the 15-year-old girl be held in custody pending further hearings after she appeared virtually for the proceedings Monday.

She has not yet been permitted to plead guilty or not guilty to the charges and will appear for another court hearing on July 5. State and defense attorneys will then decide whether they are ready to start a preliminary trial.

The 15-year-old could face up to life in prison if she is found guilty of purposefully setting fire to the Mahdia Secondary School this month.

Guyana School Fire

Injured children arrive to the airport in Georgetown, Guyana, on May 22, 2023. (AP Photo/Royston Drake)

NYPD OFFICER MISSING, PRESUMED DEAD IN GUYANA AFTER WATERFALL TOUR GONE AWRY: REPORTS

The school, a government boarding school that serves remote indigenous villages in the country’s southwest, was found ablaze shortly before midnight on May 21.

Some two dozen students were injured as firefighters worked to rescue them from the burning building heavily constructed with iron grillwork.

Fire at Guyana school

Children rescued during a Mahdia secondary school dormitory fire are transferred by medical personnel to hospitals in Georgetown, Guyana, on May 22, 2023. (Royston Drakes/AFP via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

Another 20 students were also rescued.

One of the critically injured students was sent to a hospital in New York for specialist treatment, though the majority of the injured students have been discharged.

The Associated Press contributed to this report.