(Courthouse News) – One of two Wisconsin girls accused of trying to stab their friend to death to please a fictional boogeyman accepted a plea deal Monday for a lesser-included charge of attempted homicide.

Anissa Weier, 15, pleaded guilty to attempted second-degree intentional homicide as a party to a crime, with use of a deadly weapon.

Prosecutors had charged Weier and Morgan Geyser, also 15, with attempted first-degree intentional homicide for allegedly trying 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 12-year-old girls had a sleepover.

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

Weier’s trial is still scheduled for Sept. 11. It will determine whether she is legally responsible for the crime or not guilty because of mental disease or defect, which is how she initially pleaded.

If she is found not guilty, she will spend three years in a mental hospital. A guilty verdict could mean up to 10 years in prison.

During a hearing Monday, Weier told Waukesha County Circuit Judge Michael O. Bohren that she understood her plea and explained why she stabbed her friend.

“I believed that if I didn’t go through with it, Slenderman would come and attack and kill myself, my friends and my family. Those I cared about the most,” she said.

The judge asked Weier what happened during the incident to make sure she understood her guilty plea.

“I told her that I couldn’t do it,” Weier said, adding that Geyser “asked me whether or not she should do it” when they were in the woods.

“And I just wanted it to be over with so I said, ‘Go do what you have to do,’ and Peyton was then hurt,” Weier said.

“How was she hurt?” the judge asked.

“Morgan (Geyser) jumped on top of her and stabbed her repeatedly,” Weier said.

Geyser, who has not taken a plea deal, is set to go on trial Oct. 16.

The Associated Press contributed to this report.