A Colorado teen who told investigators he planned a deadly shooting at school because he was taunted by classmates over his gender identity pleaded guilty on Friday to more than a dozen felonies, including first degree murder, the Denver Channel reported.

Alec McKinney, 16, was originally charged with 43 counts in the May 7, 2019, shooting at STEM School Highlands Ranch that claimed the life of 18-year-old Kendrick Castillo, who reportedly died while trying to confront one of the two shooters, as CrimeOnline previously reported. Devon Erickson, 19, has pleaded not guilty to the same 43 counts and goes on trial in May.

McKinney, who was born female and identifies as male, will be sentenced on May 18. District Attorney George Brauchler said he faces up to life with the possibility of parole after 40 years plus 407 1/2 years, although he could be eligible for parole after 28 years under a special program for juvenile offenders.

How do you protect your children from predators? Join Nancy Grace and a team of world-class experts for the online course ‘Justice Nation: Crime Stops Here’.

In addition to Castillo’s death, eight students were wounded in the shooting.

McKinney agreed to the plea deal after a judge ruled in December that he could be tried as an adult. The guilty plea includes first degree murder, conspiracy to commit first degree murder, 6 counts of attempted murder, conspiracy to commit arson, conspiracy to commit burglary, conspiracy to commit criminal mischief, possession of a weapon on school grounds, possession of a handgun by a juvenile, and two crime-of-violence sentence enhancers, KRDO reported. He also pleaded guilty to second degree assault for two students who were accidentally shot by a security guard who responded to the shooting.

Kendrick Castillo’s father, John Castillo, told the Denver Channel after the hearing that the guilty plea “is what we were hoping for,” but “no matter what happens in the courtroom, the results are the still the same.”

McKinney reportedly told police that classmates called him “disgusting” and referred to him as a “she.” The suspect said he planned the May 7 attack for weeks, and “wanted the kids at the school to experience bad things, have to suffer from trauma like he had to in his life,” according to court documents released last summer.

Erickson has argued that McKinney forced him to participate in the shooting, but prosecutors say evidence shows that’s not the case.

Join Nancy Grace for her new online video series designed to help you protect what you love most – your children.

[Featured image: Response to shooting STEM School Highlands Ranch May 7, 2019/AP photo, FILE]