Jaipur (India) (AFP) - An Indian court has given a woman permission to divorce her husband because their home did not have a toilet, forcing her to seek relief outdoors.

The family court in the northwestern state of Rajasthan ruled on Friday in favour of the woman, who argued that her husband's failure to provide an indoor toilet during their five years of marriage amounted to cruelty.

Justice Rajendra Kumar Sharma said women in villages often endured physical pain waiting until darkness to relieve themselves outdoors.

The judge labelled open defecation -- a major health problem in India -- disgraceful and deemed it torture to deny women a safe environment for relief, the woman's lawyer Rajesh Sharma told AFP.

Divorce is only granted in India if proof such as cruelty, violence or undue financial demands are shown in court.

It is not the first time a marriage has been called off over a toilet.

Last year a woman refused to tie the knot in Uttar Pradesh state after her fiancé refused to build a toilet for the couple.

In June another woman refused to return to the home of her in-laws until they constructed a toilet.

Nearly half of India's population -- almost 600 million people -- defecate in the open, according to UNICEF.

Some 70 percent of Indian households do not have toilets, although 90 percent have access to mobile phones.

Prime Minister Narendra Modi has promised to build a toilet in every home by 2019 in a bid to stamp out open defecation.

The government says 20 million toilets have been constructed since the start of the scheme in 2014.

But experts say open defecation not only stems from poverty but a belief that toilets inside the home are unclean.