Two 12-year-old Wisconsin girls were charged as adults for stabbing their friend of the same age during a sleepover, officials said Monday.

Morgan Geyser and Anissa E Weier stabbed the girl almost 19 times to please Slender Man, a mythological creature, they learnt about on creepy.wikia.com, a website about horror stories and legends. The two had lured the girl to a forest in Milwaukee where they attacked her and left her to die.

The wounded girl managed to crawl out of the woods. A bicyclist found the injured girl and took her to a hospital. She had stab wounds on her arms, legs and torso. Doctors said the girl was in the stable condition.

One of the stab wounds was near her heart and she was "one millimeter away from certain death," the complaint read, reports CNN.

A Waukesha County Sheriff's deputy arrested Geyser and Weier hours after the victim was found. Geyser and Weier were charged with attempted first-degree intentional homicide and were held on $500,000 bail each. According to the police, a knife with a five-inch blade was recovered from Weier's backpack.

One of the suspects told the police that they tried to kill their friend as an act of dedication to Slender Man, the "leader" of Creepypasta. They said in the hierarchy of that world, one must kill in order to show dedication to Slender Man.

According to Weier, Geyser told her they should become 'proxies' of Slender Man and kill their friend to prove themselves worthy of him.

According to their statement, the girls had been planning the murder since December. They believed the slaying would please Slender Man, who would accept them and let them live with him in his mansion in the Nicolet National Forest, reports the Associated Press.

Police said that after school Friday, Weier said she and Geyser went to Weier's house. She then packed a backpack before they went to Geyser's house. The girls were accompanied by Geyser's father and they picked up their friend. The all then went to a skating rink in Waukesha. They reached home around 9.30 p.m. and went to sleep in Geyser's room. They had planned the attack on Friday night but postponed it. They stabbed their friend during a game in a woodland park.

One of the arrested girl said she dreamt of Slender Man. She said he watches her and can read her mind and teleport. "It's extremely disturbing as a parent and as chief of police," Waukesha Police Chief Russell Jack said at a news conference ahead of the court appearances Monday.

The arrested girls will be presented in court June 11 for a status conference.