The U.S. Supreme Court ruled Monday in favor of an Alabama woman who sought legal custody after splitting up with her same-sex partner.

The case required the court to interpret the Constitution's dictate that every state must give "full faith and credit" to legal decisions reached in other states.

Two women, referred to in court documents only by their initials, were in a committed relationship in Alabama for nearly 17 years. One of them, E.L., gave birth to three children. The other, V.L., wanted to adopt them, so on the advice of a lawyer she sought and was granted full parental rights from a court in Georgia, where the laws were considered more favorable to her situation.

Several years later the women split up but could not agree on child custody. V.L. asked an Alabama court to grant joint custody, and it agreed that the Georgia adoption order must be honored.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Related: Alabama Supreme Court Refuses Challenge to Gay Marriage

But the Alabama Supreme Court tossed that order out, concluding that Georgia law barred V.L. from adopting unless E.L., the biological mother, had relinquished her parental rights. The Alabama justices ruled that the Georgia court that awarded adoption rights in the first place misinterpreted Georgia law.

On Monday, in an unsigned opinion, the U.S. Supreme Court said the Georgia ruling must be honored, reversing the Alabama Supreme Court.

In urging the court to take the case, V.L.'s lawyer, Paul Smith of Washington, D.C., said the Alabama ruling "places at risk numerous other families in which parents have relied on the stability of adoption judgments issued by the courts of sister states."

Advocates of gay rights had been watching the case closely.

"If the full faith and credit clause can be as easily circumvented as it was by the Alabama Supreme Court, the parent-child relationship will be only as strong as the credit it will be given in the most restrictive states," said a friend-of-court brief filed on behalf of V.L. by several gay rights groups.

"This case is a part of our continuing national conversation about legal respect for the relations formed by and between same-sex couples, including those who raise children."

In December, the U.S. Supreme Court put a hold on the Alabama ruling. That action allowed V.L. to have visitation rights while the case is on appeal.

Lawyers for E.L. said second-parent adoptions, which are granted to one person in an unmarried couple but also preserve the parental rights of the biological parent, are prohibited under Georgia law. The full faith and credit requirement does not apply, they argued, when the state that originally granted the adoption did not have the power to do so.

“I am overjoyed that the U.S. Supreme Court reversed the Alabama court decision,” said the adoptive mother, V.L. “I have been my children’s mother in every way for their whole lives. I thought that adopting them meant that we would be able to be together always. The Supreme Court has done what’s right for my family.”