(CNN) India's top court has abolished a colonial-era law criminalizing extramarital sex, in a landmark ruling campaigners have hailed as a victory for women's rights.
Under the 158-year-old adultery law, known as Section 497, a man could be imprisoned for up to five years for engaging in sexual relations with a married woman without the consent of her husband.
The Supreme Court struck down the law Thursday, ruling it retrograde and discriminatory toward women.
"It's time to say that (a) husband is not the master of (his) wife," Chief Justice Dipak Misra read out from the judgment. "Legal sovereignty of one sex over the other sex is wrong."
The five-judge bench was unanimous in its decision, declaring the law a clear violation of the fundamental rights granted in the constitution.
The law allowed a husband to prosecute any man who engaged in sexual relations with his wife. In addition, it prevented a wife from prosecuting either her husband or woman in which he was engaged in extramarital relations.
"You exact fidelity from a woman but not from a man?" asked Justice D. Y. Chandrachud during the four-day long hearing.
The petition was brought by Kerala native Joseph Shine, who had urged the top court to reexamine the validity of Section 497, owing to its implied gender bias.
"It is a big victory for women's status and position within marriage and within families" said Jayna Kothari, an attorney and the executive director of the Center for Law and Policy Research in Bangalore.
"The adultery offense was used really as a threat against women by their husbands," she said, adding that it was mainly used where marriages had already broken down and partners moved on.
Data showing the number of men prosecuted under Section 497 is not available.
'Sanctity of marriage'
The controversial law had long been championed by family rights campaigners, who argued that it was necessary to preserve social stability.
The Indian government, a coalition led by Prime Minister Narendra Modi's ruling Bharatiya Janata Party, had supported adultery remaining a criminal offense, suggesting that rather than scrapping the law, it was amended to be gender neutral, with equal punishment for both men and women.
However, in its ruling, the Supreme Court dismissed concerns that the abolition of the law would result in higher rates of infidelity.
"Each partner to a marriage is equally responsible to keep the sanctity of marriage intact," said the ruling.
"Section 497 destroys and deprives women of dignity and is destructive of women's dignity, self-respect as it treats women as chattel."
In a statement posted to social media, opposition Congress Party MP and president of the Party's Women's Wing, Sushmita Dev, described the ruling as an "excellent decision."
"A law that does not give women the right to sue her adulterer husband and can't be herself sued if she commits adultery is unequal treatment and militates against her status as an individual separate entity."
It is the second ruling favoring sexual liberation in India this month following the repeal of Section 377, a colonial-era law criminalizing consensual gay sex.
The law penalized intercourse "against the order of nature" and had carried a maximum sentence of life imprisonment.
The decision to repeal the law was seen as a major victory for India's LGBT activists and supporters after years of determined struggle.