The 16-year-old charged with opening fire inside a STEM School Highlands Ranch classroom in May will be tried as an adult, a Douglas County judge ruled on Wednesday.

“Based on the totality of the evidence before it, the Court finds that it is has not been proved that the juvenile and the community would be better served by transferring this case to juvenile court,” Judge Jeffrey K. Holmes wrote in his decision.

Alec McKinney and Devon Erickson, 18, each face 43 charges, including first-degree murder, for their roles in the shooting that killed 18-year-old Kendrick Castillo and injured eight others.

Holmes decided on Nov. 18 that the case would go to trial, but Wednesday’s ruling cemented that the case will remain in adult court, where he was initially charged. McKinney, whose attorneys had asked the judge to send the case to juvenile court, next will appear in court on Dec. 16 for his arraignment.

The judge’s decision marks the culmination of seven days of emotional testimony in which the court heard from a parade of McKinney’s family members, teachers and therapists, along with adolescent brain experts and juvenile corrections officials. The judge also weighed the heavy words of mothers of the teens injured or killed in the classroom that day, who spoke of the unimaginable horror in getting a call that would forever change their lives.

In his decision, Holmes addressed the 11 different factors that must be considered when deciding whether to send a case back to juvenile court. The judge seemed to agree with the prosecution on several points made during the recent hearing, including: the determination that McKinney’s actions were “purposeful and planned”; that he was adequately mature for his age and had a more stable home life than the defense argued; and that evidence of significant bullying was conflicting.

Holmes also cited McKinney’s response to a previous arrest for selling Xanax to a friend, who overdosed, as a significant warning sign.

“It is of great concern that despite being involved in the juvenile justice system and seeing the potentially devastating consequences of his actions on another person’s life, McKinney moved forward with a plan to cause harm to others,” the judge wrote.

Holmes also expressed skepticism, citing McKinney’s past experience, that the teen would take advantage of the services provided in any facility if he is convicted.

“Presently, the likelihood of McKinney’s rehabilitation utilizing the sentencing options available through either the juvenile or the adult systems is uncertain,” he wrote.

John Castillo, Kendrick’s father, said he was up at 3:30 a.m. Wednesday, unable to sleep while thinking about the pending decision.

“I’m elated,” Castillo told The Denver Post after learning of the judge’s decision. “As a grieving family having to go through these court proceedings for seven days, I was hoping and praying this would be the result.”

Throughout the hearings, McKinney’s defense team painted the picture of a child irrevocably harmed by a violent, drug-filled upbringing, and a system that let the teen fall through the cracks. McKinney’s father beat his mother constantly. The mother turned to drugs and alcohol, leaving McKinney in charge of his siblings at a young age. The teen struggled with his sexuality, ultimately dealing and using drugs to cope with increasing depression and suicidal thoughts.

The prosecution argued that McKinney had support from family, teachers and mental professionals, but that he consistently deceived and manipulated them for his own gain. Prosecutors detailed McKinney’s extensive planning before the shooting, and the pressure he put on Erickson to join in.

“On behalf of the many, many victims and our community, I am satisfied and pleased that the court agreed that this mass shooting case should be resolved in adult court,” 18th Judicial District Attorney George Brauchler said in a statement. “I am grateful to the victims and their families for the patience and understanding they have shown as they navigate a challenging and often-times slow justice system.”

McKinney sat for the entirety of the hearing alongside his public defenders and guardian ad litem — a court-appointed advocate for juveniles — occasionally breaking down into tears during testimony. He has been housed since the May shooting at the Marvin W. Foote Youth Services Center in Centennial.

Erickson will appear in court Friday for his arraignment. A judge in September bound his charges over for trial, where he could face life without parole if convicted.