By Emily Zantow, Courthouse News

(CN) – A second Wisconsin girl reached a plea deal Friday on charges of trying to stab her friend to death to please a fictional boogeyman, avoiding a trial that was set for next month.

Morgan Geyser, 15, agreed to plead guilty to attempted first-degree intentional homicide, attorneys said Friday. Her plea hearing is next week.

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.

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

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.

Geyser’s trial was scheduled to begin Oct. 16. A judge will determine how long she will stay in a state mental hospital.