OMAHA, Neb. (AP) — The Nebraska Supreme Court on Friday reversed a ruling by a lower court judge who denied a same-sex couple’s petition to adopt a child, based not on state law but on the legal definition of “wife” that he pulled from a law dictionary.

The reversal came in the case of two married women who sought last year to adopt a 3-year-old child whom they had raised since her birth. Dixon County Judge Douglas Luebe denied the petition, saying he had no jurisdiction to grant the request to the women, who were listed in their petition as “wife and wife,” because a law dictionary defined “wife” as “‘a woman who has a lawful living husband.’”

The Nebraska high court rejected that reasoning, saying state adoption laws clearly allow a same-sex married couple to adopt, and that “any adult person or persons” can adopt a child. So set is the law that the Nebraska Attorney General declined to file a brief defending the judge's ruling.

The judge's reasoning was flawed, the high court said, because the plain language of the state law doesn't preclude same-sex married couples from adopting.

“The only caveat contained in the statute is that if the person had ‘a husband or wife,’ the husband or wife had to join in the petition" to adopt, Justice William B. Cassel wrote for the high court. That requirement has always existed in state adoption law, because were the adopting parent to die, their spouse would have no legal rights to the child, who could then become a ward of the state.

Luebe did not return messages left at his offices in Dakota, Dixon and Ponca counties. He later contacted Nebraska Supreme Court spokeswoman Janet Bancroft to relay a message to The Associated Press that he would have no comment. Judges in Nebraska are ethically barred from commenting on specific cases, Bancroft said.

It's not the first time the Nebraska Supreme Court has made clear its stance on the legality of same-sex adoption.

In 2017, the high court affirmed a judge’s ruling striking down a 1995 state policy that banned same-sex couples from serving as foster parents or adopting wards of the state. In a scorching opinion, the high court slammed the former policy as akin to hanging a “Whites Only” sign on a hiring-office door.

Sara Rips, an attorney for the American Civil Liberties Union of Nebraska who represented the couple in their appeal, said Friday's ruling should solidify that married LGBTQ couples have the same rights as married heterosexual couples.

“But I think there will always be challenges,” Rips said. “I think we have a lot of fight left to go.”