Charging documents for a man accused of shooting a teenager at a school playground Tuesday say the shots were fired during a fight that started with two younger teens arguing over a girl.

On Wednesday morning, the department announced 22-year-old John-Rexie Lagman had been arrested for shooting and seriously injuring a 16-year-old male, who is identified as R.T.

According the documents, Lagman and R.T. were part of a large group of people recruited to attend a fight at Williwaw Elementary School Tuesday evening. The fight was initially between a 13-year-old boy and a 14-year-old boy.

During an investigation, the court documents state that the 14-year-old believed the 13-year-old had been flirting with his girlfriend over Instagram.

The teenagers recruited multiple people to come to the fight, the court documents state. Three people, including R.T., came to back up the 14-year-old and six people, including Lagman, came to back up the 13-year-old.

"Eyewitness statements to police indicate that the groups confronted each other at the park," the court documents state.

Two of the teens — identified as L.C. and N.Y. — got into a physical altercation, which escalated into what is described in the documents as a "melee" with everyone involved. The only exception was a 21-year-old woman, who recorded the event on her phone.

According to the document, at some point during the fight R.T. pulled out a screwdriver and began stabbing people, sending a 17-year-old to the hospital. Lagman was stabbed at least once in the back.

Lagman told police that after being stabbed by R.T. he pulled out a .40-caliber handgun and shot R.T. as he ran away. He said he fired a second shot several seconds later, not knowing whether the first shot had hit R.T.

Everyone ran from the scene, court documents state.

R.T. was struck twice — once in the arm and once in the back. Police say he was taken to the hospital with life-threatening injuries and remains in critical condition.

Lagman was initially charged with first-degree assault and reckless endangerment. On July 19, Lagman was indicted by an Anchorage grand jury on charges of first-degree attempted murder, three counts of first-degree assault and a single count of third-degree assault.

An arraignment is scheduled for July 23.

Copyright 2019 KTVA. All rights reserved.

MORE NEWS FROM KTVA: