A teenage girl who shot 14-year-old Endia Martin to death pleaded guilty to murder charges less than a week ahead of a scheduled trial date in the 2014 shooting case.

The girl, who herself was 14 at the time of the shooting, entered a plea agreement in Cook County Juvenile Court on Tuesday. She faces the maximum juvenile sentence of 5 years behind bars on murder and attempted murder charges. Her trial had been set to begin on Monday.

The deadly shooting came after a heated social media exchange between the two girls, over a boy they both liked.

The shooter, who the Chicago Sun-Times is not naming because she was a minor at the time of the April 2014 shooting, had marched over to a Back of the Yards house where Martin was hanging out with friends.

In the group of some two dozen people outside the house with the shooter was her 25-year-old uncle, Donnell Flora and her aunt Vandetta Redwood. Flora, who used a wheelchair after his legs were paralyzed in a 2009 shooting, brought a .32-caliber revolver.

Donnell Flora | Chicago Police photo

Name-calling between the two teens escalated, with Flora’s pistol changing hands from Flora to Redwood, to their 14-year-old niece. Martin, who had been on the porch with her friend, Lanekia Reynolds, ran inside the house, but came back outside in response to taunts.

Witnesses testified that Redwood, goaded her teenage niece, urging her to “shoot that b–ch” before the teen opened fire. Bullets struck Martin and Reynolds, who reportedly has swung a chain at Martin. The girl fired, striking both Martin and Reynolds as they ran back into the house, prosecutors said.

Flora in 2016 was sentenced to 100 years in prison for murder and attempted murder charges tied to the shooting.

Vandetta Redwood | Chicago Police photo

Redwood, who denied handing the gun to her niece, was acquitted of federal charges for providing the gun used in the shooting.

The teen shooter’s sentencing hearing is set for April 4.