PITTSBURGH (KDKA/AP) — A judge has shot down a request made by Alex Hribal to plead guilty but mentally ill.

In November, the teen, accused in the 2014 stabbing attack at Franklin Regional High School, requested to change his plea from not guilty. He was just 16 years old when police say he stabbed 20 fellow students and a security guard.

Defense attorney Patrick Thomassey has argued Hribal was too mentally ill to appreciate the wrongfulness of his behavior when he stabbed the victims at Franklin Regional High School in Murrysville.

Join The Conversation On The KDKA Facebook Page
Stay Up To Date, Follow KDKA On Twitter

But Dr. Bruce Wright, the DA’s expert, said although Hribal was depressed and mentally ill “in my opinion he had the capacity to appreciate the wrongfulness of his actions.”

“He chose not to,” Wright said.

In a 14-page decision, Judge Christopher Feliciani agreed with the expert, saying that while the teen may have suffered from mental illness, that illness did not cause him to substantially lack the capacity to appreciate the wrongfulness of his conduct.

The judge cited Hribal’s planning and preparation ahead of the rampage and inconsistent mental health assessments in issuing the denial.

If the guilty but mentally ill plea had been accepted, it could have resulted in Hribal doing some portion of his sentence in a mental health facility.

(TM and © Copyright 2017 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2017 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)