One of the two Wisconsin teens who admitted to stabbing a classmate in 2014 to please Slender Man, a fictional horror website character, was determined to be mentally ill at the time of the attack.

Ten out of 12 jurors ruled Friday that Anissa Weier, 15, was mentally ill when she and Morgan Geyser, 15, stabbed their classmate, Payton Leutner, 19 times. Weier pleaded guilty to attempted second-degree homicide due to mental illness as part of a plea agreement in August.

Weier will now be admitted to a mental institution. She had faced up to 10 years in prison if she was found mentally fit.

“I know her family is relieved. It's hard to say when you are talking about the commitment of a very young child that you are happy but of the options that were there, this is the best and the right one,” Weier's attorney Maura McMahon told reporters Friday.

McMahon said Weier will spend three years at a mental health facility before her family petitions for her release. McMahon also said that a judge can order up to a 25-year commitment for Weier.

Weier and Geyser were both 12 years old when they lured their classmate, Leutner, into the woods in the Milwaukee suburb of Waukesha and allegedly stabbed her. The girls felt that they were Slender Man’s “proxies,” and had to stab their classmate on behalf of Slender Man so that the character wouldn't hurt their own families.

Geyser pleaded not guilty because of mental disease to being a party to first-degree attempted intentional homicide. Her trial begins in October.

A psychologist in Weier’s trial claimed that she developed a condition called shared delusional disorder, in which she started to believe Geyser’s notion that Slender Man was real. Geyser was diagnosed with schizophrenia during the trial, according to WISN, an ABC News affiliate in Milwaukee.