Washington (CNN) -- Maryland's highest court has ruled that a lesbian couple married out of state can legally file for divorce, even though Maryland's own same-sex marriage law does not take effect until next year.
The issue is whether states without legalized same-sex marriage can recognize gay or lesbian weddings outside their borders. The appeal involved a Prince George's County couple, Jessica Port and Virginia Anne Cowan.
"Maryland courts will withhold recognition of a valid foreign marriage only if that marriage is 'repugnant' to state public policy. This threshold, a high bar, has not been met yet," the seven state Court of Appeals justices said in their 21-page opinion. "The present case will be treated no differently. "
The couple were married in a 2008 civil ceremony in San Francisco, during a short window when California recognized same-sex marriage.
A voter referendum in California later outlawed same-sex marriage, but a federal appeals court recently ruled against that ban. It said such a ban was unconstitutional and singled out gays and lesbians for discrimination. The case appears to be headed to the U.S. Supreme Court.
The couple, who did not have children, settled in suburban Washington. They eventually separated and filed for divorce in Maryland when their relationship went sour, their attorneys have said.
But a Maryland judge denied the couple's filing, ruling in 2010 that the divorce could not be recognized under the current state constitution.
The "same sex marriage in which parties hereto participated is not valid pursuant to Maryland law," the judge said. "To recognize the alleged marriage would be contrary to public policy of Maryland."
Port and Cowan appealed, and the justices unanimously ordered the county court to grant the divorce, saying that "a valid out-of-state same-sex marriage should be treated by Maryland courts as worthy of divorce."
Gay rights group praised the ruling.
"There are many same-sex spouses who married elsewhere who now live in Maryland," said National Center for Lesbian Rights Legal Director Shannon Minter. "This ruling ensures that they have all the same rights as any other married couple in Maryland. This is a powerful decision that will provide enormous security and protection to thousands of families."
Susan Sommer, director of constitutional litigation at Lambda Legal, said, "The high court of Maryland confirmed today in this divorce case that out-of-state marriages of same-sex couples are entitled to legal recognition under longstanding principles of comity, allowing this couple the same access to a divorce as other married couples whose relationships have ended."
While the case highlights state differences in the recognition of same-sex marriages, analysts have said it will probably have little influence outside Maryland because federal law allows states to ignore how other states define marriage.
"This is simply going to be a case about the Maryland state constitution," said Mark A. Graber, a law professor at the University of Maryland School of Law.
Gay rights activists say the matter often leaves same-sex couples in legal limbo when moving between states, claiming that Maryland state courts have also inconsistently ruled on issues relating to same-sex marriages.
"Divorce is never easy, but when a couple has made the decision to end their marriage, there is no reason why the state should prevent them from ending their legal relationship and moving on with their lives," said Erik Olvera, a spokesman for the National Center for Lesbian Rights.
Maryland Gov. Martin O'Malley signed into law a bill that allowed same-sex couples to wed. The law, however, isn't scheduled to take effect until January 1.
The measure's opponents have pledged to challenge it by holding a referendum during November's election.
The Maryland Marriage Alliance group says it's gathered thousands of signatures and is approaching the threshold required to put the issue on the ballot, adding further uncertainty to the Port and Cowan case.
"If anything, it shows the nuttiness of the interim period," Graber said of the unclear nature of Maryland state law in apparent transition.
A recent public opinion poll conducted by Annapolis-based firm OpinionWorks found that a slight majority of residents would vote for repealing the new law.
Of those responding, 43% "would vote to make same-sex marriage illegal in Maryland, while 40% would vote to make it legal," the poll said. The poll had a sampling error of plus or minus 4%.
"Although this result is within the poll's margin of error, it is the intensity of feeling among same-sex marriage opponents that causes the overall result to lean slightly towards repeal," said Steve Raabe, OpinionWorks president.
Currently, Massachusetts, Connecticut, Iowa, Vermont, New Hampshire, New York and the District of Columbia issue marriage licenses to same-sex couples.
In February, Washington Gov. Christine Gregoire signed a bill into law that legalizes same-sex marriage, but it does not take effect until June. Opponents there have pledged to block the bill, also calling for a referendum.
Five states -- Delaware, Hawaii, Illinois, New Jersey and Rhode Island -- allow civil unions that provide rights similar to marriage.
North Carolina residents voted this month to outlaw same-sex marriage, which was already prohibited in the state.
A 1996 federal law known as the Defense of Marriage Act would not force states to recognize same-sex marriages allowed in other states. That law -- now being challenged in federal court -- was not the case in the current dispute, the Maryland high court said.
"Some states have elected not to recognize valid foreign same-sex marriages for purposes of domestic divorce proceedings," the court said. "Those states, unlike Maryland, expressed clear public policies."
CNN Legal Affairs Producer Bill Mears contributed to this report.