DES MOINES, Iowa (AP) — The Iowa Supreme Court has ruled that parents must be given preference in regaining custody of their children in cases where other people have been caring for the kids through guardianship.

In a decision involving the case of a single mother and her child’s grandparents, the court on Friday established that parents have a fundamental right to the care, custody and control of their children.

The court said that in cases where parents are seeking the return of children and dissolving of guardianship, the juvenile court must presume “the child’s best interests are served by reuniting the minor child with their parent.”

The ruling was prompted by the case of a child born to a 16-year-old mother.

The child lived mostly with her grandparents but the mother sought full return of custody.