PAW PAW, Mich. (WOOD) — A Paw Paw teenager who allegedly planned an attack on his high school has been sentenced to mental health treatment.

A judge Monday morning ordered the 15-year-old to remain in a youth home until he could be enrolled in inpatient treatment.

“The recommendation today is for placement in an institution and that is what the court will be looking at in this case,” Judge Jeffrey J. Dufon said.

The judge acknowledged the teen had mental health issues, but said he needed to be held accountable.

“These were very serious crimes that were committed and even more serious crimes that were contemplated,” Dufon said. “The pain and suffering you have caused by your actions will last for years.”

Paw Paw High School canceled March 19 classes after authorities say the teen had created a detailed plan to shoot and kill classmates and others at the school. Authorities said he stole shotguns from his grandfather and sawed them off so they could be concealed. They say the teen also gathered ammunition and materials to make bombs and Molotov cocktails.

His parents said the teen came to them and confessed to stealing the shotguns and cutting them down. That’s when they took him to the sheriff’s department. The parents said the teen had been bullied, which the school liaison officer disputed.

Before the sentence was handed down, the school superintendent and two teachers read victim impact statements.

“On March 18, I received the call no school official wants to hear: One of our students had been arrested for being in possession of weapons with the intent to use them at school,” Superintendent Sonia Lark said, turning to face the teen. “My first reaction was a heartfelt prayer of thanks for the safety of our students. The next was a heartfelt prayer for the student whose actions were unthinkable.”

She went on to call for a harsher punishment.

“A piece of us was taken that day,” teacher Brian Clements said, fighting back tears. “The ‘what ifs’ we battle daily do not go away. They haunt. What if my daughter had to live her life without her dad?”

Another teacher shared her students’ concerns.

“The Tuesday we returned to school, I had several tearful, confused students ask me ‘Ms. Barkes, what did we miss? Why would he want to hurt us? What did we do wrong? He was my friend and I had no idea he wanted to kill us. How could he manipulate us like that?'” Kristin Barkes said.

The judge was thankful tragedy was avoided, but acknowledged the student’s history of trauma.

“Why would a child feel so unsafe that he contemplates such serious, serious violence?” the judge wondered. “He was in survival mode and who knows what would have happened had his mom not brought him over to that police station.”

24 Hour News 8 is not identifying the teenager because he is being recognized by the court as a juvenile. He pleaded guilty to the charges last month.