By Lily Kuo

WASHINGTON (Reuters) - Maryland's highest court on Friday recognized the previously denied divorce of a same-sex couple who wed in California but sought to divorce in Maryland, where gay marriage is not yet legal.

The state's Court of Appeals ruled 7-0 that Jessica Port and Virginia Anne Cowan have the right to divorce in Maryland because they were legally married in 2008 in California.

Maryland's Circuit Court for Prince George's County, where Port was a resident, denied their request for divorce in 2010 on the basis that it was invalid under Maryland law.

"A valid out-of-state same-sex marriage should be treated by Maryland courts as worthy of divorce," the court ruled.

The decision is part of a broader shift in attitudes toward gay wedlock in Maryland, where a law was passed in March to begin recognizing same-sex marriages at the start of next year.

Some Maryland residents against same-sex marriage are pushing for a referendum on the law in the November general election, but need 56,000 signatures to put the measure on the ballot.

Not all states must recognize same-sex marriages validated by other states, referred to in legal terms as "foreign marriages."

The court pointed out in its ruling that Texas declares such marriages as void and against Texas public policy.

The court noted that Maryland still reserves the right to deny recognition of a valid foreign marriage if it is "repugnant" to the state's public policy but said the bar for meeting that criterion was high.

Advocates for same-sex marriage still applauded the measure.

"The ... ruling establishes that Maryland law respects marriages of same-sex couples entered elsewhere, bringing clarity to the legal recognition due these marriages," said National Center for Lesbian Rights Legal Director Shannon Minter.

(Reporting By Lily Kuo; Editing by Xavier Briand)