“We’re happy to announce that we’ve resolved Morgan’s case. She is going to enter a plea to the charge of the information which is the attempted first-degree intentional homicide, the enhancer for the use of a dangerous weapon will be stricken and there is a joint agreement for her to be found NGI, or not guilty by reason of mental disease,” Geyser’s attorney Donna Kuchler told reporters Friday morning.

Prosecutors claimed Geyser and Anissa Weier, also 15, tried to stab their friend Payton Leutner to death in May 2014 to appease Slenderman, a fictional horror character.

Leutner was found crawling out of woods with 19 stab wounds near Geyser’s home in Waukesha, Wis., the morning after the three then-12-year-old girls had a sleepover. She survived after several surgeries.

The case made headlines around the world and the HBO documentary “Beware the Slenderman” brought renewed attention to the stabbing.

After Geyser’s plea is entered on Thursday, she will undergo an evaluation to determine where she will be placed and whether she still needs institutional care. A minimum term has yet to be decided but the maximum is 40 years.

“[Prosecutors] got a plea to the serious charge of party to a crime of attempted first-degree homicide,” Kuchler said. “At a trial, she might’ve been potentially found guilty of a lesser crime so they gain that. And I think, ya know, it’s just fair. It saves everybody a trial, saves the victim, her family, the state and all of the expense that goes along with the trial.”

Weier was also originally charged with attempted first-degree intentional homicide, but she accepted a plea deal last month on the lesser charge of attempted second-degree intentional homicide as a party to a crime, with use of a deadly weapon.

Two weeks ago, a jury found that Weier was mentally ill at the time of the attack, meaning she will spend at least three years in a mental hospital instead of doing time in prison.

Both girls could be kept at a mental institution in Winnebago, Wis.

“It’s been a tragic experience for everyone. Our hearts go out to the victim and her family. And we’re very grateful that the district attorney’s office gave this case the consideration it deserves,” Kuchler said. “Morgan has been receiving mental health care for the past two years and she has made incredible strides. She’s being properly medicated and we’re hopeful that when the doctors deem her appropriate for discharge that she will be released at whatever point in time that is.”

Geyser’s trial was scheduled to begin Oct. 16, but next week’s plea hearing will bring an end to the three-year case.