Image copyright AP Image caption Morgan Geyser had invited her friends over for a sleepover for her birthday before the crime

One of two girls accused of stabbing a 12-year-old classmate to please the online horror character Slender Man has pleaded not guilty in a US court on the grounds of mental illness.

A judge in Wisconsin has now appointed two doctors to evaluate Morgan Geyser.

She and Anissa Weier, both now aged 14, are being tried as adults, charged with attempted murder.

The girls could face decades in jail if convicted, Their victim was stabbed 19 times in May 2014 but survived.

She was found crawling from woods by a cyclist near the city of Waukesha. She had stab wounds to her arms, legs and torso.

Ms Weier pleaded not guilty last year.

Investigators say the two girls had been plotting for months to kill their victim in "dedication" to Slender Man, a fictional horror website character.

They spoke of their desire to become the paranormal figure's "proxies" by killing to demonstrate their loyalty, police said.

Who is Slender Man?

Image copyright mdl70/Flickr

He is a skinny, shadowy figure, who has appeared in photos, drawings and articles across the internet.

Some claim he has tentacles emerging from his back and most say he wears dark clothes and has a pale face.

The schoolgirls involved in the attack in Waukesha say there were inspired after reading about him in a creepypasta, a short online story designed to shock or scare the reader.

Slender Man first appeared on the internet in 2009.

Eric Knudsen from Florida created the character in response to a call for submissions from the online forum SomethingAwful and posted the picture of the figure behind a crowd of people.

Slender Man: Born in cyber land

The origins of Slender Man

Last month, an appeal court in Wisconsin confirmed an earlier decision by a lower court that it was reasonable to try both girls as adults because the crime was planned and violent.

Their lawyers had argued for the case to be heard in juvenile court, saying both teenagers were suffering from mental illness.

Image copyright Police Photo Image caption Morgan Geyser (L) and Anissa Weier (R) were 12 at the time of the crime

Following the attack, both suspects were found walking near a local highway, and a knife was found in one of their backpacks, police said.

The girls had planned to stab their friend during a sleepover at Ms Geyser's house where they had been celebrating her birthday.

But instead they decided to commit the crime the next morning in a nearby park.

After the attack, they reportedly intended to walk to Slender Man's mansion, which they believed was situated in Wisconsin's Nicolet National Forest.

The victim has recovered and returned to school.

The next court hearing is in October.