(CNN)A Wisconsin teenager accused of stabbing a classmate in 2014 to win favor with a fictional internet character named "Slenderman" has been ordered to spend 40 years in a mental institution instead of serving jail time.
2nd teen in 'Slenderman' stabbing gets 40 years in mental institution
Morgan Geyser, 15, pleaded guilty in October to a charge of attempted first-degree murder in a deal with prosecutors to avoid jail time.
Geyser's sentence was handed down after a day of testimony from expert witnesses about the teenager's progress in psychological treatment. While she has made progress, according to the experts, Waukesha County Circuit Judge Michael Bohren determined she needed further treatment.
"We can't forget what we are dealing with. And we can't forget that this was an attempted murder," Bohren said when announcing his decision. He also noted the crime was premeditated.
Geyser's defense attorneys had argued the teenager was a first-time offender who needs treatment but could be reintegrated into the community.
"She shows remorse," said Anthony Cotton, one of Geyser's defense attorneys. "I think the remorse demonstrated that she is not a sociopath."
Geyser apologized to the victim and her family when given an opportunity to address the court.
"I never meant this to happen," a tearful Geyser said. "I hope that she is doing well."
As part of the agreement, under Wisconsin law, a judge found her not guilty by reason of mental disease or defect, meaning she will ultimately not be held criminally responsible for the attack.
Geyser and her friend Anissa Weier, both 12 at the time of the crime, lured their 12-year-old classmate into a park in Waukesha, Wisconsin, where they stabbed her 19 times to impress the Slenderman, a boogeyman for the internet age.
The victim survived, crawling to safety before she was discovered by a passing bicyclist.
Prosecutors had asked the county judge to sentence Geyser to 40 years in a mental institution, the maximum amount allowed, according to CNN affiliate WTMJ.
Geyser was diagnosed with schizophrenia a few months after the attack, CNN affiliate WISN reported.
CNN does not typically name minors charged with crimes, but it makes exceptions if they are charged as an adult, as were both Geyser and Weier.
In August, Weier, then 16, pleaded guilty to attempted second-degree homicide due to mental illness or defect as part of a similar plea agreement stipulating she would accept commitment to institutional care. In December, a judge ordered her to 25 years in a mental health facility.
She will spend at least three years there before she can ask to be discharged. If doctors deem she can be released for outpatient care, she could then be under state supervision until she is 37.