httpss://www.youtube.com/watch?v=ySy8mcceTno

A Wisconsin girl who stabbed a classmate to curry favor with the fictional horror character Slender Man will be committed to a mental hospital for 40 years, a judge ordered Thursday, explaining his decision as “An issue of community protection.”

Judge Michael Bohren granted the maximum penalty that prosecutors had sought and discounted Morgan Geyser’s youth – she was just 12 – at the time of the attack in 2014.

Earlier, he heard from four doctors who talked about how Geyser is making progress with her mental illness, to various degrees.

Geyser, now 15, spoke briefly before she was sentenced, breaking down in tears as she apologized to the girl she stabbed, Payton Leutner.

Geyser and another girl, Anissa Weier, admitted that they lured Leutner into some woods near a suburban Milwaukee park.

Geyser and Weier said they carried out the attack to appease Slender Man, a fictional online horror character who they said they feared would otherwise harm them and their families.

Dr. Brooke Lundbohm acknowledged that Geyser has made significant progress over the last three years, but said she emphatically believes she is still a danger to herself and others.