JOHANNESBURG - A court in South Africa ordered the government on Friday to change the law to formally recognise Muslim marriage for the first time to avoid being in breach of the constitution.

Under the country's common law system, Muslim marriages are not recognised limiting the options of Muslim women to seek legal recourse in the event of divorce.

The Western Cape High Court ordered that "legislation to recognise marriages solemnised in accordance with the tenets of Sharia law (Muslim marriages) as valid marriages".

"The president and cabinet together with parliament are directed to rectify the failure within 24 months of the date of this order," judge Siraj Desai said.

The case was brought by the Women's Legal Center (WLC) which argued that women entering into Islamic marriages did not benefit from the same rights and legal protection as those in civil or customary unions - especially in cases of divorce.

It claimed Muslim women entering into Islamic marriages were often left without access to property and money in cases of marital breakdown. "Muslim women can now enjoy legal protections that are afforded to people that get married under the Marriages Act, legal protection that Muslim women have not had," said WLC lawyer Charlene May.

"The judgement has the potential to impact on thousands of women in the country who practice and live their faith and who are walking around without protection."

Roughly 1.5 percent of South Africa's 55 million people are Muslim.