A judge on Friday refused to reduce the $500,000 bond set for two Wisconsin girls accused of trying to kill their classmate in an attempt to please the fictional horror character Slender Man.

Judge Michael Bohren denied requests by the girls' attorneys to lower the bond amount. Both girls have been in custody for two years, and their families say they can't afford to post the high bond. But the judge cited the potential flight risk, noting that both girls tried to run away after the 2014 attack, and the seriousness of the crime.

"Even the best effort to secure someone, outside of a secure facility, doesn't always work," Bohren said.

The girls' families, including crying relatives, and their attorneys quickly left after the hearing and didn't speak to the media.

Authorities say the girls were 12 years old when they lured their classmate into the woods after a birthday sleepover and repeatedly stabbed her. The victim, who was also 12, was found along a road, bleeding from wounds that nearly killed her.

The Associated Press hasn't identified the defendants because their cases could move to juvenile court, where proceedings are closed. The girls are facing trial as adults, but that decision is under review by an appeals court.

Slender Man is described in fictional stories as an unnaturally tall, thin demon-like figure that lacks facial features. He is said to live in a mansion in a forest. Authorities say the girls hoped to live in that fictional home after the attack.

In arguing for his client's release, defense attorney Anthony Cotton said in court documents this week that his client's mental health has improved. The girl, now 13, has been diagnosed with early-onset schizophrenia, which is rare.

Cotton also said his client was sexually assaulted last year at the county detention center where she has been in custody. During a phone hearing Wednesday, the judge said he would consider the allegation but was concerned that it wasn't immediately reported.

On Friday, defense attorneys for both girls said their clients' mental states had improved. One girl said she was diagnosed as having a "shared delusional belief" that had improved with separation from her co-defendant. The other girl reported significant recent improvement from proper doses of anti-psychotic medication.

Cotton also brought in a counselor who testified that his client no longer heard voices or believed she interacted with Harry Potter characters, as she had in the past.

Bohren said that while the improvements were good for both girls, a decision to reduce bond was not based on "a defendant-centered analysis." He said the role of medication in the improvement of Cotton's client "reinforces the concern" and "emphasizes the need" to keep a high bond to protect the public.

Cotton's previous efforts to reduce his client's bond also failed. This was the first time the other girl's attorney, Maura McMahon, had attempted to reduce her client's bond.

The girls are due back in court in July, unless the appeals court rules before that.