Updated

One of the Wisconsin teenagers charged with stabbing a classmate to impress the fictional character “Slender Man” will avoid prison time after a plea deal struck Friday.

Under the agreement, Morgan Geyser, 15, will plead guilty to the 2014 attack and remain in a state mental hospital where she will be evaluated by doctors.

The doctors will determine how long she should remain in treatment.

Geyser and Anissa Weier were charged with attempted first-degree intentional homicide in the 2014 attack on classmate Payton Leutner. Weier pleaded guilty to a reduced charge last month, and a jury later concluded she was mentally ill at the time of the crime. She faces at least three years in a mental hospital.

All three girls were 12 at the time.

"It's been a tragic experience for everyone" Geyser's attorney, Donna Kuchler, said after the brief court hearing. "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 considering it deserves," she said.

A plea hearing to make the deal official is scheduled for Thursday.

Prosecutors alleged the teenage girls stabbed Leutner 19 times in a wooded area following a sleepover, then left her. The girls planned to walk hundreds of miles north to meet Slender Man in a forest. Both suspects were 12 at the time of the attack.

Leutner was able to crawl out of the woods in the park to a path where she was found by a bicyclist.

The Associated Press contributed to this report.