The second teenage girl charged with stabbing a classmate to curry favor with fictional horror figure "Slender Man" has been sentenced to 40 years in a mental hospital.

Morgan Geyser, 15, is a danger to herself and others, Wisconsin Judge Michael Bohren ruled Thursday. She spoke briefly in court before her sentencing, breaking down in sobs as she apologized to the victim.

Geyser and her friend, Anissa Weier, lured Payton Leutner into a wooded park in 2014 and repeatedly stabbed her to appease the made-up villain who preys on children. Leutner was able to crawl for help after being abandoned in the woods.

All three girls were 12 at the time.

Geyser pleaded guilty in October to first-degree intentional homicide to avoid prison. Weier was sentenced in December to 25 years in a psychiatric facility.