A US federal judge has ordered an Alabama official to issue marriage licences to gay couples, after a three-day standoff.

The ruling applies to Mobile County, where same-sex couples have been unable to wed because the local judge refused.

US District Judge Callie Granade made the ruling after a brief hearing.

It is not immediately clear whether judges in another 43 of Alabama's 67 counties will now have to change their positions and allow gay marriage.

The judge overturned a state-wide ban on gay marriage last month before the US Supreme Court decided on Monday that it would refuse to stop gay marriages - a move that sparked joyous scenes in Alabama.

But a plea from Alabama Chief Justice Roy Moore, telling judges not to issue licences, caused confusion. Many judges followed Mr Moore's advice.

On Thursday, Judge Granade ordered one of the judges, Mobile County Probate Court Judge Don Davis, to follow her directive and not heed the contravening order from Moore.

Hundreds of gay couples did wed in Alabama this week, despite the confusion.

This meant Alabama became the 37th US state to legalise same-sex marriage, ahead of a nationwide ruling later this year.

Image copyrightAPImage caption
Other couples elsewhere in the state were able to wed