WAUKESHA, Wisconsin — A Wisconsin judge said on Wednesday he will decide in August whether one of two girls accused of stabbing a classmate 19 times to please the fictional character Slenderman will face trial in juvenile or adult court.

The girls, Anissa Weier and Morgan Geyser, were charged as adults with attempted first-degree homicide in the May 2014 attack on a classmate in Waukesha, a suburb of Milwaukee. All three girls were 12 years old at the time.

Waukesha County Circuit Court Judge Michael Bohren heard testimony over two days on a request from Weier’s attorneys to move her case to juvenile court. He said he would announce his decision on Aug. 10. A similar hearing is scheduled for Geyser in June.

Witnesses and experts for the defense testified at the hearing that the juvenile detention system is better suited to handle the now 13-year-old Weier’s needs.

Both girls could be sentenced to up to 60 years in prison if convicted as adults in the stabbing. If convicted as juveniles instead, they could be imprisoned up to age 25 only.

Wisconsin law requires cases to begin in adult court if they involve juvenile suspects at least 10 years old who are charged with first-degree attempted intentional homicide.

Prosecutors say the girls lured a classmate into the woods after a sleepover and stabbed repeatedly to impress the Internet character Slenderman. She survived the attack and returned to school last fall.