SAN FRANCISCO (AP) — The California Supreme Court on Thursday made it easier for some immigrant children who are abused or abandoned by a parent to seek a U.S. visa to avoid deportation in a ruling that advocates said would help thousands of children.

State judges cannot require that children drag an absentee parent living abroad into court in their visa application process, the justices said in a unanimous decision. Immigration rights advocates had warned that such a requirement would make it nearly impossible for the children to fight deportation. That's because courts in California cannot establish authority over a foreign citizen and the parent may want nothing to do with a child claiming abuse, and would refuse to participate in a court proceeding in the U.S., immigration groups said.

The ruling overturned a lower court decision. The California Supreme Court said it was sufficient to adequately notify the absent parent of the court proceedings, but that parent did not have to be a party to the case.

California Attorney General Xavier Becerra said in court documents that the case had implications for a "substantial portion" of the thousands of children who have fled to the U.S. from Central America and Mexico and settled in California. Kristen Jackson, an attorney for the plaintiff in the case, estimated the ruling would affect thousands of children.

The decision came in the case of a girl, identified in court documents only as Bianka M., who fled Honduras as a 10-year-old and arrived in the U.S. alone in 2013. Bianka's mother was in the U.S., and the girl sought a state court order granting her mother sole custody. She also asked a state court judge to declare that she could not reunite with her father because he abandoned her and that returning to Honduras was not in her best interest.

She sought a special visa that could lead to a green card. A Los Angeles County court, however, said it needed to determine that the man Bianka claimed as her father was in fact her father. The court also raised concerns that awarding custody to Bianka's mother without his involvement could violate his right to determine how she is raised and expose him to child support requirements.

Bianka's mother testified that the man left her when she was pregnant with Bianka and said he would rather see Bianka dead than have to support her, according to court documents. Bianka's attorneys noted that California courts could not establish authority over an "unwilling foreign resident," so she would have to convince the man to attest that he was her father.

"In her case and a lot of other cases, California family courts were putting up insurmountable barriers to these children," Jackson, an attorney with the law firm Public Counsel, said. "We're thrilled that the California Supreme Court made sure that vulnerable immigrant children in California are able to access the protection they need and which both federal and state law mandate."