Updated

A girl who told investigators she helped stab her 12-year-old classmate was under "control of a delusional disorder" and convinced the crime would protect her and her family from a fictional horror character called Slender Man, her attorney told jurors Tuesday.

Attorney Joseph Smith told jurors during opening statements Anissa Weier had a "broken mind," and was suffering from a mental illness at the time of the stabbing at a Waukesha park in 2014, and therefore is not criminally responsible.

Slender Man 1

Anissa Weier listens during jury selection in her trial at Waukesha County Courthouse. (ap)

"Anissa's broken mind caused her to lose touch with reality," Smith told jurors. "Anissa was under the command and control of a delusional disorder."

Weir's classmate, Payton Leutner was stabbed 19 times in a plot by Weier and co-defendant Morgan Geyser, prosecutors said, and left in a wooded park where she eventually crawled for help after the girls left.

A passing bicyclist found Leutner. Weier and Geyser were arrested later that day while reportedly walking to meet Slender Man in a northern Wisconsin forest. All three girls were 12 years old at the time.

Slender Man 2

Anissa Weier, left, talks to her attorney Maura McMahon during jury selection. (ap)

Waukesha County Assistant District Attorney Kevin Osborne told jurors Weier and Geyser knew they were committing a crime, and the initial plan was for Weier to stab Leutner, but Weier couldn't do it, and she instead commanded Geyser to do the stabbing.

Related stories...

"They knew this was wrong. They understood what they were doing was wrong," Osborne said.

Prosecutors charged both girls with being a party to attempted first-degree intentional homicide. Weier struck a deal with prosecutors in August in which she pleaded guilty to being a party to attempted second-degree intentional homicide, essentially acknowledging she committed all the elements of the offense. But she also has pleaded not guilty due to mental illness, meaning she believes she isn't responsible for her actions because she lacks the capacity to understand her conduct was wrong.

Slender Man 3

Anissa Weier talks to a sheriff's deputy during a pause in jury selection. (AP)

"How could she have believed this?" Smith Jr. ask jurors rhetorically, according to the Milwaukee Journal Sentinel.

Weier told a judge during her plea hearing in August that she believed Slender Man would attack her and her family if she didn't kill Leutner. Psychologists have testified that she suffered from persistent depression and a delusional disorder linked to schizotypy, a diminished ability to separate reality from fantasy.

At least 10 of the 12 jurors must agree on a verdict.

Geyser has pleaded not guilty to being a party to first-degree attempted homicide. Her trial is set to begin Oct. 9.

The Associated Press contributed to this report.