CASTLE ROCK, Colo. — The younger of two students charged in a fatal school shooting in suburban Denver will be tried as an adult, a judge ruled Wednesday.

In a written order, District Judge Jeffrey K. Holmes said lawyers for Alec McKinney, 16, failed to prove that it would be better for McKinney or for the community for him to be prosecuted in juvenile court. The maximum sentence there for the most serious charge against him, first-degree murder, carries a maximum sentence of seven years confinement compared with a minimum sentence of life in prison in adult court.

McKinney and Devon Erickson, 18, each face over 40 charges, in the May 7 shooting at STEM School Highlands Ranch that killed Kendrick Castillo, 18.

Holmes said the seriousness of the offenses and the protection of the community required consequences beyond those provided by juvenile court. He said the motive for the shooting is not clear but said that McKinney actions were “not spontaneous but purposeful and planned.”

“The emotional and psychological impact of the offenses has included fear, anxiety, reluctance to return to school, decrease in trust of others, anxiety and depression. The impact on the victims has been extreme and continues more than six months after the shootings occurred,” Holmes wrote.

The ruling followed a recent multi-day hearing with emotional testimony from both McKinney’s mother, Morgan McKinney, about how she was abused by McKinney’s father in front of their children and from Castillo’s mother, who said her “life is over” following the loss of the best son she could have asked for. Psychologists, counselors and other McKinney family members and friends testified that McKinney was sexually abused, neglected, suffered depression and suicidal thoughts and cut himself.

Holmes concluded that McKinney experienced “serious trauma”, noting that his father, Jose Quintana, forced his mother and McKinney and his siblings into the family’s vehicle at knifepoint when he was 5. Quintana was subsequently deported Mexico in 2010 although Morgan McKinney continued to take her children to visit him there until around 2013.

McKinney is transgender and told a defense expert that his gender identification was the basis for harassment. However, Holmes noted that there is conflicting evidence about whether he was subjected to “significant bullying” because he is transgender or because of anything else.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.