Last Updated Feb 2, 2018 10:55 AM EST
WAUKESHA, Wis. -- A Wisconsin girlmade a tearful apology before she was sentenced Thursday to spend 40 years in a mental institution.
Judge Michael Bohren granted the maximum penalty that prosecutors had sought for Morgan Geyser for stabbing Payton Leutner in suburban Milwaukee in 2014. He discounted Geyser's youth - she was just 12 - at the time of the attack.
"What we can't forget is this was an attempted murder," Bohren said. He said he believed Geyser remained a risk to hurt herself and others, and called it "an issue of community protection."
Geyser, now 15, spoke briefly before she was sentenced. She broke down in tears, apologizing to the girl she stabbed.
"I just want to let Bella and her family know I'm sorry," Geyser said, using a nickname for Leutner. "I never meant this to happen. And I hope that she's doing well."
Geyser and another girl, Anissa Weier, admitted that they lured Leutner into some woods near a suburban Milwaukee park. Geyser stabbed Leutner 19 times while Weier urged her on, according to investigators. Leutner was left for dead but she crawled out of the woods and got help from a passing bicyclist.
All three girls were 12 at the time.
Geyser and Weier said they carried out the attack to curry favor with Slender Man, a fictional online horror character typified by spidery limbs and a blank white face.
Doctors who evaluated Geyser provided conflicting opinions at Thursday's sentencing hearing in Waukesha County Circuit Court about the type of institutional care Geyser needs and the severity of her continued hallucinations.
Prosecutors wanted Geyser to spend the maximum 40 years in a mental hospital. To make their case, they presented testimony from a doctor who said Geyser reported still hearing voices from someone named "Maggie" as recently as September.
Dr. Brooke Lundbohm acknowledged that Geyser has made significant progress over the last three years, but said she emphatically believes she is still a danger to herself and others.
"This is not a close call," she said.
Geyser's attorneys advocated for her to be moved to a less restrictive facility with children her age and the possibility of being able to be on outings with supervision if she's well enough.
Two doctors called by the defense said Geyser no longer exhibits psychotic symptoms.
"I believe at the present time she is no more dangerous than any adolescent her age," said Dr. Kenneth Robbins.
The hearing lasted most of the afternoon and included victim impact statements.
Geyser pleaded guilty to attempted first-degree intentional homicide in October in a deal with prosecutors to avoid prison.
in December. She had pleaded guilty in August to being a party to attempted second-degree intentional homicide, but she claimed she wasn't responsible for her actions because she was mentally ill. In September, a jury agreed.
Geyser's attorneys have argued in court documents that she suffers from schizophrenia and psychotic spectrum disorder, making her prone to delusions and paranoid beliefs.
A psychiatrist hired by her attorneys previously testified that Geyser believed she could communicate telepathically with Slender Man and could see and hear other fictional characters, including unicorns and characters from the Harry Potter and Teenage Mutant Ninja Turtles series. She also believed she had "Vulcan mind control."
Slender Man started with an online post in 2009, as a mysterious specter whose image people edit into everyday scenes of children at play. He is typically depicted as a spidery figure in a black suit with a featureless white face.