One of the two suspects who orchestrated a Colorado school shooting in May pleaded guilty to 17 felonies on Friday, including the charge of first-degree murder.

Alec McKinney, 16, reached a plea deal with prosecutors following a ruling from a judge in December, that said he would be tried as an adult, Fox 31 reported. He originally faced 48 charges in connection with the crime.

“Due to changes in Colorado law in 2016 by the state legislature, the mandatory minimum sentence for 16-year-old McKinney is life with possibility of parole after 40 years minus earned time. The maximum sentence under the plea agreement is life with the possibility of parole after 40 years minus earned time plus 407½ years in the Department of Corrections,” the 18th Judicial District Attorney’s Office said in a statement.

The shooting took place at a STEM school in Highlands Ranch, a Denver suburb only about seven miles from Littleton, the site of the infamous Columbine High School mass murder in 1999. STEM refers to science, technology, engineering and mathematics, the key areas of the school's curriculum.

Police interviews depicted McKinney as the leader of the shooting and reveal that he recruited Devon Erickson, 19, to assist him in the rampage, according to Fox 17.

COLORADO SCHOOL SHOOTING LEAVES AT LEAST 1 DEAD, 8 INJURED; 2 IN CUSTODY, SHERIFF'S OFFICE SAYS

The two are accused of coming to school and opening fire, killing one student and injuring eight more.

The student who was killed, Kendrick Castillo, 18, was gunned down when he lunged at one of the suspects, who opened fire in his classroom. Another student, Brendan Bialy, also helped to disarm one of the shooters but survived.

The two students had a "number of weapons," which included two handguns, according to Douglas County Sheriff Tony Spurlock. He also noted that neither suspect was old enough to buy or own the weapons.

CLICK HERE TO GET THE FOX NEWS APP

Erickson has reportedly pleaded not guilty to the same charges McKinney was facing. Sentencing for McKinney is scheduled for May 18.

Fox News' Nicole Darrah and The Associated Press contributed to this report