Image caption Maryland has recognised out-of-state same sex marriages since 2010

Gay couples can get divorced in Maryland even though same-sex marriage is not yet allowed in the US state, its highest court has ruled.

Maryland's Court of Appeals unanimously ruled in the case of two women married in California who were denied a divorce in the state in 2010.

Gay marriage was legalised in Maryland in March, and is to begin in January.

But opponents hope voters will overturn the measure in a referendum this November.

To do so, 56,000 signatures must be gathered by the end of June in favour of such a ballot.

"A valid out-of-state same-sex marriage should be treated by Maryland courts as worthy of divorce, according to the applicable statutes, reported cases, and court rules of this state," the judges' ruling said .

Jessica Port, 29, and Virginia Cowan, 32, were married in California in 2008, shortly before gay marriage in that US state was banned by a constitutional amendment known as Proposition 8.

Nearly two years later, the couple filed for divorce in Maryland where they had been living at the time, but a Prince George's County judge declined to grant it.

A lawyer for Ms Port praised Friday's ruling, saying that now same-sex marriages would be recognised in Maryland regardless of what happens to the gay marriage law in November.

Six US states and the District of Columbia have legalised same-sex marriage.