One of two teenage girls involved in the attempted murder of their friend to appease the fictional 'Slenderman' internet character has been sentenced to 40 years in a psychiatric institution.

If you've heard about this story - or indeed, seen the documentary about it, 'Beware the Slenderman' - you'll be aware just how chilling it really is.

Morgan Geyser and Anissa Weier lured their friend Payton Leutner to a wooded area in their native Wisconsin in 2015, where Geyser stabbed her 19 times with a kitchen knife, urged on by Weier. Both girls were 12 at the time.

Last December, Weier was sentenced to 25 years in a psychiatric hospital. Geyser's lawyers had pleaded guilty to attempted first-degree intentional homicide in a deal to keep her out of prison, claiming that she had been delusional as a result of schizophrenia and psychotic spectrum disorder.

Upon sentencing the 15-year-old, the judge said that 40 years was a "reasonable and fair taking into account the unique circumstances of this case".

"It’s a long time,” he said. "But this is an issue of community protection. This is an issue to be sure there’s no recidivism. This is an issue to ensure that Ms. Geyser doesn’t have a revolving door situation where she ends up being in the community and then things fall apart and she comes back.”

A crying Geyser apologised to Leutner - also known as Bella - when she spoke briefly at the sentencing. "I just want to let Bella and her family know I’m sorry,” she said. “I never meant this to happen. And I hope that she’s doing well.”