WAUKESHA - A judge Thursday chose the maximum period of commitment — 25 years — for a 15-year-old girl found not guilty by reason of mental disease or defect in the Slender Man stabbing case.

Anissa Weier, 16, will move to Winnebago Mental Health Institute, where, by her own agreement, she will spend at least three years before seeking release on community supervision, still considered part of the commitment order.

Because she is credited with the 3½ years she has served in a West Bend juvenile jail on $500,000 bail, her supervision would last until she is 37.

Waukesha County Circuit Judge Michael Bohren followed the prosecution recommendation for the maximum length of supervision. He cited the sensational crime's broad impact on not only the victim but the community.

"It was a planned murder by kids," he said. "We can't forget the goal was to kill."

Bohren seemed particularly bothered by what he called "startling" events over the past 18 months, when a report indicated Weier talked of making a Ouija board at the jail and of it unleashing spirits she sensed were pushing on her bed.

Despite finding Weier mature, empathetic and remorseful now, Bohren said no one can be sure she would be completely free of delusions or psychological challenges by age 25, when her attorney suggested the mental commitment should end.

Weier and Morgan Geyser were 12 when they stabbed their friend Payton Leutner 19 times and left her to die in the woods after a sleepover. They later told investigators they had plotted the shocking offense to please Slender Man, an internet boogeyman who they believed would kill their families if they didn't carry out the crime.

RELATED:Slender Man victim still physically scarred and fearful three years after stabbing attack, mother says

They were arrested within hours. Charged as adults with attempted first-degree intentional homicide, their cases moved slowly. Experts tested their legal competency, and their lawyers fought unsuccessfully to have the case moved to juvenile court, suppress their statements to detectives or have them released pending trial before they both finally entered insanity pleas.

Weier's lawyers worked out a deal: She would plead guilty to attempted second-degree intentional homicide, then try her insanity defense to a jury in what's known as a penalty phase trial. If the jury found her not criminally responsible, she agreed she would not seek release from secure mental treatment for three years.

If the jury rejected her defense, prosecutors said they would recommend only 10 years in prison, less than half the 25-year maximum. Ultimately the jury found her not criminally responsible.

Geyser's attorney, Maura McMahon, noted that her client has spent about a quarter of her life in jail already and has been a model inmate at the juvenile jail, where she has become known as "pod mommy," offering guidance and encouragement to other juveniles who typically stay in the facility less than a week.

Though they attended the hearing, Weier's family spoke to Bohren via a video. They offered apologies to the Leutner family and said that Weier, though often upbeat during daily visits from family members, still struggles to understand why she got involved in the crime.

"She knows she's going to get help," her sister, Sarah, said, "and she's OK with getting it."

Leutner's parents and grandparents attended the hearing, as they have for nearly every one of the dozens held in the case, but relied on the written victim impact statement from Stacie Leutner, Payton's mother, and did not speak to Bohren. Afterward, they hugged each other and detectives and victim advocates.

McMahon said Weier was touched by the letter's statement that Payton wanted the girls to get treatment.

"It was one of the kindest things she's heard in 3½ years," McMahon said. "It made her cry."

Geyser pleaded guilty to the original charge, which carried a possible maximum sentence of 45 years in prison, but prosecutors agreed she was not guilty by reason of mental disease or defect.

Geyser had been diagnosed with early onset schizophrenia during legal competency exams in 2014. Despite becoming increasingly symptomatic in jail, she didn't get treatment until she was committed by a different judge in a separate civil proceeding in December 2015.

Her final commitment hearing in the criminal case is set for February.