A combined SWAT team waits outside the middle school entrance at STEM School Highlands Ranch after a shooting that killed one and wounded eight students. (John Leyba, Special to The Colorado Sun)

The younger of two students charged in the deadly STEM School Highlands Ranch shooting in May pleaded guilty on Friday.

Alec McKinney, 16, pleaded guilty to 17 felonies, including first-degree murder, under a plea deal, the 18th Judicial District Attorney’s office said.

In December, a judge ruled that McKinney would be prosecuted as an adult in the May 7, 2019, shooting that killed Kendrick Castillo, a 18-year-old fellow student. Eight other students were also wounded in the attack.

MORE: STEM School Highlands Ranch security guard reaches agreement with DA for firing gun, wounding students

Devon Erickson, 19, has pleaded not guilty to the same charges McKinney faced in the shooting. Erickson’s lawyers have portrayed McKinney as the ringleader who pressured Erickson to participate.

Castillo was among the students who rushed Erickson after authorities say he pulled out his gun in a classroom.

McKinney is due to be sentenced on May 18. Other charges initially brought against him were dismissed as part of the plea agreement.

The Associated Press

Email: newsroom@coloradosun.com