The Arizona Court of Appeals says married same-sex partners are entitled to the same parental rights as heterosexual couples. The case involves a lesbian couple who was legally married in 2008 but recently filed for divorce.

Court records show the couple agreed to have a child through artificial insemination in 2010. They also entered into a joint parenting agreement.

When the boy was nearly 2, one of the women, who was his biological mother, moved out and took the child with her. At issue is whether the other spouse should be considered a parent under the law.

An appeals court panel ruled both parents have parental rights despite an Arizona law saying a “man” is presumed to have rights when married to the mother within 10 months before the birth.

The judges said any other interpretation of the law would undermine a 2014 US Supreme Court ruling that entitles same-sex couples the same legal protections as heterosexual couples.