PONTIAC, Mich. (AP) — A judge in Michigan who's under criticism for detaining a 15-year-old girl after she failed to do her schoolwork denied the teenager early release Monday and said she was placed in a juvenile facility because she was a threat to her mother.

Oakland County Circuit Court Judge Mary Ellen Brennan said during a hearing in Pontiac that her “role is to make decisions that are in” the teen’s best interest, according to The Detroit News. The judge said police had been called out three times for confrontations between the teen and her mother.

ProPublica reported last week that the girl has been in Oakland County’s Children’s Village since mid-May for violating probation in a case involving allegations of assault and theft. Brennan cited a “failure to submit to any schoolwork and getting up for school.”

Brennan had said the girl was a threat to the community based on the assault allegation involving her mother in November, according to court documents. The girl also allegedly stole a cellphone from a fellow student at Birmingham Groves High School in Beverly Hills, northwest of Detroit.

The girl is being called “Grace” to protect her identity. She was placed on probation in April and, among other requirements, was to complete her schoolwork. Grace, who has ADHD and receives special education services, struggled with the transition to online learning and fell behind.

When Brennan sentenced the girl to detention on May 14, she told her that she was sending her to Children’s Village to get treatment and services.

“She was not detained because she didn’t turn her homework in,” Brennan said Monday. “She was detained because she was a threat to her mother.”

“My role is to make decisions that are in this young lady’s best interest, period,” Brennan said. “I took an oath that I would not be swayed by public clamor or fear of criticism.”

Birmingham Public Schools said last week that it had no role in the case, but that no student should be punished for missed online work during the coronavirus pandemic.

The district switched to virtual instruction following a state-mandated shutdown of schools in March.

The ProPublica story was also published by the Detroit Free Press and Bridge, another news organization.

Grace is Black, and news of her case prompted protests over how Black children are treated in the criminal justice system.

“People need to learn how to work with our kids,” said Monique Campbell, who is African American and participated in a protest Monday outside the court building. “There needs to be equitable treatment of all kids, and we need to realize there isn't.”

Vivian Anderson, founder of EveryBlackGirl Inc., also attended the protest and said Black children are being criminalized for “behavior that's accepted in other communities as a way of life — this is their aging process.”