WAUKESHA, Wis. (AP) — One of two Wisconsin girls who stabbed a classmate to impress horror character Slender Man is due in court to finalize a plea deal aimed at sparing her prison time.

Fifteen-year-old Morgan Geyser will plead guilty to attempted first-degree intentional homicide in the 2014 attack. Prosecutors and Geyser's attorneys agreed to the plea last week, but it is being finalized during a court hearing Thursday in Waukesha County court.

The plea agreement calls for Geyser to be found not guilty by reason of insanity as part of the case's sentencing phase, meaning she will be committed to a mental hospital indefinitely.

Geyser's co-defendant, Anissa Weier (ah-NEE'-sah WY'-ur), pleaded guilty to a reduced charge last month and faces at least three years in a mental hospital.

More From WIBX 950