Image copyright AP Image caption Hundreds of same-sex couples have obtained licences in Alabama in recent weeks

Alabama's Supreme Court has ordered the state's judges to stop issuing marriage licences to same-sex couples.

A federal ruling says banning same-sex marriages is unconstitutional.

But the court in Alabama has decided that does not preclude state law being followed, which defines marriage as between a man and a woman.

Last month, a US federal judge ordered an Alabama official to issue marriage licences after a three-day standoff.

The all-Republican court in Montgomery sided with two conservative organisations which had appealed a decision by US District Judge Callie Granade who had ruled in January that Alabama's ban on same-sex marriages was unconstitutional.

"As it has done for almost 200 years, the state of Alabama allows for 'marriage' between only one man and one woman. Alabama probate judges have a ministerial duty not to issue any marriage licence contrary to this law", the ruling by the state Supreme Court in Montgomery says.

It is the latest apparent defiance to the US Supreme Court in Washington and it highlights the depth of opposition to same-sex marriages in the socially conservative state.

Image copyright AP Image caption It is unclear what the status is of marriage licences already issued

In January, Judge Callie Granade intervened after Alabama Chief Justice Roy Moore had told judges not to issue licences, dismissing the refusal as unconstitutional.

The court in Montgomery did not explicitly invalidate the marriages of hundreds of same-sex couples which have already gone through, but used the term ``purported'' to describe the licences obtained.

The US Supreme Court in Washington has already decided a ban on same-sex marriages violates the US constitution, but is due to consider in June whether individual states can follow their own licensing laws.