WAUKESHA, Wis. -- A Wisconsin girl who stabbed a classmate in an attack inspired by the fictional horror character Slender Man was sentenced to 40 years in a mental hospital Thursday.



Judge Michael Bohren granted the maximum penalty that prosecutors had sought, and discounted Morgan Geyser's youth -- she was just 12 -- at the time of the attack in 2014.



"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, Payton Leutner.



"I just want to let Bella and her family know that I'm sorry," she said, using a nickname for Leutner.



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.



Weier was sentenced to 25 years in a mental hospital in December. She 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.



At Geyser's sentencing Thursday, doctors who evaluated her gave conflicting opinions about the type of institutional care she needs and the severity of her continued hallucinations.



Prosecutors 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 argued 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.



They argued in court documents that she suffered from schizophrenia and psychotic spectrum disorder, making her prone to delusions and paranoid beliefs. But two doctors called by the defense Thursday said she no longer shows psychotic symptoms.



"I believe at the present time she is no more dangerous than any adolescent her age," said Dr. Kenneth Robbins.



Geyser pleaded guilty to attempted first-degree intentional homicide in October in a deal with prosecutors to avoid prison.

-- The Associated Press