SAN FRANCISCO (AP) — The state can remove an out-of-control child from the custody of a parent even if the mother or father is not to blame for the child’s behavior, a California appeals court said Thursday.

If children face substantial risk of harming themselves, it doesn’t matter whether the parent did anything intentional to put them in that position, the 2nd District Court of Appeal ruled.

READ MORE: San Bernardino County Cracking Down On Sale, Use Of Illegal Fireworks With New Reporting Tool

“When a child thereby faces a substantial risk of serious physical harm, a parent’s inability to supervise or protect a child is enough by itself to invoke the juvenile court’s dependency jurisdiction,” the court said in its 3-0 ruling.

The ruling came in the case of an unnamed Los Angeles County mother whose teen daughter repeatedly ran away from home and had a child at the age of 15. The appellate court said the girl remained incorrigible despite her mother’s best efforts, which included looking for her each time she left home, sending her to live with her grandparents and calling the police and Los Angeles County Department of Children and Family Services for help.

“(The) mother in this case was neither neglectful nor blameworthy in being unable to supervise or protect her daughter,” the court said.

READ MORE: NBC Will Not Air 2022 Golden Globes Amid Hollywood Foreign Press Association Controversy

But state law is clear that children can still be taken if they have suffered or are at substantial risk of suffering serious harm that a parent is unable to stop, Associate Justice Brian Hoffstadt wrote.

The court’s ruling upheld a juvenile court’s decision to assert control over the child and allow the county to place her elsewhere. The county placed her back with her grandparents.

The mother appealed the decision, and the girl turned 18 while the appeal was pending.

The court disagreed with another state appellate court that ruled in 2010 that a parent had to be shown to be culpable for a failure or inability to supervise or protect a child.

MORE NEWS: Game On: LAUSD Says Venice High Baseball Team Can Play On Renovated Field

(Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)