CHICAGO (AFP) - One of two girls accused with stabbing a friend inspired by a fictitious internet character pleaded guilty to a reduced attempted homicide charge on Monday in a Wisconsin court.

Anissa Weier, who is now 15 but was 12 years old at the time of the 2014 crime, agreed to plea to a lesser charge of second-degree homicide as party to a crime, with use of a deadly weapon.

She originally faced first-degree intentional homicide. She will stand trial next month to determine if she is legally responsible considering her mental health condition.

She told the court she participated in the attack, because she feared the internet character Slender Man - a villain featured on a horror website - would otherwise hurt her and her family, according to US media.

Both she and her alleged accomplice Morgan Geyser are accused of stabbing their friend Payton Leutner 19 times at a park. A bicyclist found Leutner and helped her get to a hospital.

After the attack, the suspect teens told police they were headed to see Slender Man at a national forest hundreds of miles away, according to the Milwaukee Journal Sentinel.

Both defendants have entered an insanity plea.

Should the jury reject the insanity defence for Weier, prosecutors would recommend up to 10 years in prison, according to the paper.

If she is found not guilty due to mental issues, she has agreed not to seek conditional release until July 2020 from a state mental hospital.

Geyser's attorney told reporters at the courthouse that a plea deal in her case is also possible.

"I really don't think there's a whole lot we're fighting over in this case," the Journal Sentinel reported Anthony Cotton as saying.