Updated

The Latest on a plea hearing for one of two girls charged with stabbing a classmate in an attack they said was done to please the fictional horror character Slender Man (all times local):

4:50 p.m.

A Wisconsin girl who repeatedly stabbed a classmate to impress the fictional horror character Slender Man has written a "very powerful letter" of apology to the victim and hopes it can be delivered to her one day.

Anthony Cotton, an attorney for 15-year-old Morgan Geyser, says she is remorseful for the 2014 attack and wrote the letter without prompting from anyone.

Geyser pleaded guilty to the stabbing Thursday in an agreement with prosecutors to avoid prison time. She and another girl, Anissa Weier, admitted to carrying out the attack in a Milwaukee-area park. The classmate survived.

Geyser sobbed in court during the plea hearing as she recalled the stabbing under questioning from the judge.

Doctors will evaluate Geyser's mental health by Nov. 13 and the judge will later determine how long she should be committed.

___

4:15 p.m.

Wisconsin prosecutors want a 15-year-old girl to be confined in a mental hospital for 40 years after she pleaded guilty to stabbing a classmate in an attack aimed at impressing the fictional horror character Slender Man.

Fifteen-year-old Morgan Geyser will be evaluated by a doctor by Nov. 13 before a judge schedules sentencing.

Geyser and another girl, Anissa Weier, admitted carrying out the 2014 attack on a classmate in a Milwaukee-area park. Their classmate survived her wounds. All three girls were 12 at the time.

Geyser sobbed in court Thursday as she told a judge she "had to" carry out the stabbing. When the judge asked where she had stabbed her classmate, she said: "Everywhere."

___

6:36 a.m.

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.