The 13-year-old Carol City Middle School student arrested Wednesday for bringing a weapon to school pointed the loaded firearm at two students in a classroom across a hall and chased them until a school security guard intervened, police said.

The teen’s arrest affidavit says she was across the hall from two students in a classroom when they began arguing. Then she reached into her book bag and removed a loaded 9mm handgun.

“She then proceeded to run out of the office and enter the classroom where the victims were located while exhibiting the firearm,” the arresting Miami-Dade Schools Police officer wrote.

The two students who were chased managed to run out a rear exit and to safety before a security guard intervened and took the weapon away from the 13-year-old. Police said it had six rounds of ammunition.

Miami-Dade Public Schools spokeswoman Daisy Gonzalez said only two students were in the classroom when they were confronted by the studen with a weapon. It was before classes began and most of the students were in the cafeteria, she said.

Miami-Dade Schools Police responded and took the teen into custody. She was charged with aggravated assault with a deadly weapon and carrying a concealed firearm on school property.

On Thursday morning, the teen, her mother and aunt appeared in juvenile court. She was ordered placed on home detention told not to make contact with the two students she chased.

Police and school leaders also placed part of the blame on the teen’s cousin, a 34-year-old man named Kerry Watkins. Police said the student told them she retrieved the gun from his dresser drawer in the home they shared.

Police arrested Watkins on Wednesday, charging him with storing his weapon improperly and within reach of a child.