A Wisconsin teen accused of stabbing a sixth-grade girl to please a fictional internet character called Slender Man was declared mentally ill and sentenced to 25 years in a mental hospital Thursday.

According to the ruling, Anissa Weier, 16, will remain in custody until she is placed in a mental care facility.

“I do hold myself accountable for this and that I will do whatever I have to do to make sure I don’t get any sort of delusion or whatever again. I want everyone involved to know that I deeply regret everything that happened that day. Nothing I say is going to fix what I broke. I'm never going to let this happen again,” Weier said during Thursday’s hearing at a Waukesha County court, Pittsburgh Post-Gazette reported.

However, victim Payton Leutner’s family was not present during the hearing Thursday. On behalf of the victim’s family, Waukesha County Assistant District Attorney Kevin Osborne said: “Considering the nature and gravity of this offense, being supervised until the age of 37 is not all that long ... in terms of the fact that Payton is looking at a lifetime of scars — psychological scarring, physical scarring — that she's going to have to deal with. So, saying that 25 years is a long time, pales in comparison to that.”

Weier’s attorney Maura McMahon, on the other hand, argued she should not be kept in the mental facility beyond her 25th birthday. She also played a video in the court in which Weier’s father, sister, and grandparents spoke on her behalf, asking for forgiveness.

“She’s grown mentally and physically. She knows what she did was wrong,” Weier’s father said.

Leutner was nearly stabbed to death in 2014 when she was lured to a secluded wooded park in Waukesha, a Milwaukee suburb, by Weier and her partner-in-crime Morgan Geyser. However, Leutner managed to somehow crawl out of the woods and make it to safety until a passer-by spotted her and informed the police.

Soon after, Weier and Geyser were arrested. Confessing to the crime, the accused said they had to stab Leutner in order to please the fictional internet character Slender Man and become his “proxies,” Fox News reported.

Slender Man is a fictional supernatural character that originated as a creepypasta Internet meme created in 2009. The character is depicted as a thin, unnaturally tall man with a featureless head and face, wearing a black suit. Stories of the Slender Man commonly feature him stalking, abducting or traumatizing people, particularly children.