CENTENNIAL, Colo. (KDVR) — Convicted school shooter Devon Erickson will spend life in prison without the possibility of parole for killing one student and injuring eight others when he opened fire in a Colorado classroom in 2019.

Erickson faced the maximum sentence on every person-related count, resulting in a total sentence of life in prison without the possibility of parole plus 1282.5 years, according to lead prosecutor George Brauchler.

Erickson was convicted of 46 criminal counts earlier this year, including one count of first-degree murder.

Prosecutors said Erickson and fellow student Alec McKinney targeted a group of students who were watching a movie in their classroom at STEM School Highlands Ranch, south of Denver, on May 7, 2019.

Their attempt to kill a large number of students was foiled when several boys, including Kendrick Castillo, charged at Erickson. Castillo was shot during the incident and died.

A school security guard apprehended McKinney.

Life in prison without the possibility of parole is Colorado’s mandatory sentence for an adult convicted of first-degree murder. Many of the other charges have sentences that must run consecutively.

During the sentencing hearing on Friday, several survivors of the shooting spoke, as well as the parents of Castillo. Erickson’s parents also spoke.

The victims’ impact statements lasted for hours. Erickson chose not to speak afterward.

McKinney was also one of the witnesses in the trial. He has been sentenced to life in prison plus 38 years.

The Associated Press contributed to this report.