A judge on Monday refused to free a Michigan teenager who was incarcerated in May after she allegedly violated probation by failing to finish her online schoolwork, according to a report.

Judge Mary Ellen Brennan, the presiding judge of the Oakland County Family Court Division, said the girl, identified as Grace, will benefit from ongoing treatment at a Detroit area juvenile detention center and was not yet ready to return to her mother.

“I think you are exactly where you are supposed to be,” Brennan told Grace, her middle name, according to the ProPublica report on Monday. “You are blooming there, but there is more work to be done.”

MICHIGAN GIRL SENT TO JUVENILE DETENTION FOR NOT DOING ONLINE SCHOOLWORK: REPORT

Grace was previously placed on probation after an alleged fight with her mother and for thefts at school, the report said. Police had been called to the family's home in the past. She has been in custody at Children's Village juvenile detention center for more than two months now after Brennan ruled she violated her probation on May 14 -- because one of the terms was completing her online coursework amid the coronavirus pandemic, according to ProPublica last Tuesday.

Grace has ADHD, a learning disorder that she said caused her to feel unmotivated and overwhelmed while online learning, the report said.

“She was not detained because she didn’t turn her homework in,” Brennan said during the hearing on Monday. “She was detained because I found her to be a threat of harm to her mother based on everything I knew.”

The case sparked several protests last week, with Michigan state and federal lawmakers calling for Grace’s release. Hundreds of Detroit-area students protested outside their high school Thursday while holding "Free Grace" signs.

MICHIGAN GOV. WHITMER ANGERS GOP LAWMAKERS AFTER USING STATEWIDE EMERGENCY ALERT SYSTEM FOR MESSAGE ON MASKS

Caseworkers recommended Grace stay at Children's Village for another three and a half months, arguing that she was now behaving well and was engaged during the program, ProPublica reported. “They have made significant progress,” court caseworker, Ashley Bishop, said. “In speaking with mom, she reports they have been able to communicate much better, [Grace)] is more self-aware, she is more serious, she is more thoughtful.”

Meanwhile, Grace on Monday argued her good behavior meant she was ready to go home: “I believe placement in my home with the same, consistent therapy that I was getting beforehand, and love and support that will always be around me, will be a benefit for myself, my mom, my family, and my community."

CLICK HERE FOR THE FOX NEWS APP

The hearing on Monday came after Grace’s new attorney, Jonathan Biernat, filed a motion last Thursday asking the court to review the case and send her home, according to the report. Another hearing is scheduled for September.