India’s top court has ruled that adultery is no longer a crime, declaring that the colonial-era law is unconstitutional and discriminatory against women.

A five-judge bench of the supreme court unanimously ruled that the criminal offence of having a sexual relationship with a woman without her husband’s consent was archaic and deprived women of agency.

The case, brought by an Indian businessman living in Italy, sought to have section 497 of the Indian penal code and another similar provision made gender neutral. But the court said the offence, which carried a prison sentence of up to five years, was arbitrary and needed to go.

“It is time to say husband is not the master,” said the chief justice, Dipak Misra. He quoted John Stuart Mill: “Legal subordination of one sex over another is wrong in itself.”

Indu Malhotra, one of two women among the 25 judges on the court, said: “The time when wives were invisible to the law, and lived in the shadows of their husbands, has long since gone by.”

There is no official data on how frequently men were prosecuted under the law, but it was often raised in divorce proceedings, lawyers say.

The decision is one of several socially progressive rulings by the court this session. This month the justices ruled to decriminalise homosexuality, and on Friday they will decide on a case about whether women in their menstruating years can be restricted from entering Kerala state’s Sabarimala temple.

Indian court upholds legality of world's largest biometric database Read more

Like the decision to legalise homosexual acts, some advocates against the adultery law characterised Thursday’s decision as an act of decolonising the country’s Raj-era criminal code.

“I welcome this judgment by the supreme court,” said Rekha Sharma, the head of India’s National Commission for Women. “It was an outdated law, which should have been removed long back. This is a law from British era. Although the British had done away with it long back, we were still stuck with it.”

The court has been more willing to affirm British-era legislation when it comes to restricting speech, in recent years endorsing imperial laws against criminal defamation and creating (but later dropping) a rule that Indians must stand while the national anthem is played in movie theatres.

“I wouldn’t yet call it a progressive era in the court,” said Gautam Bhatia, a Delhi-based lawyer and legal scholar. He said in cases such as the adultery or homosexuality rulings, the court was dispensing with laws that had clearly fallen behind social mores. “These are the low-hanging fruit,” he said.

Thursday’s decision was decried by some prominent feminists including Swati Maliwal, Delhi’s commissioner for women. She said the adultery law should have become gender neutral because it could be a deterrent against men abandoning their families, in a society where women wield little power, especially in poorer or deeply patriarchal areas of the country.

“Thousands of women approach the commission, many from disadvantaged backgrounds, saying their husbands are acting in an adulterous manner and have left them without support to look after the children,” Maliwal said. “At least with this law a woman can get a sense of justice, and the men have a kind of fear that when they enter a relationship, it has some sanctity that they have to live with.

“In an ideal society I would totally agree with this judgment, but we are not talking about an ideal society,” she said.

Lawyers for the central government had opposed scrapping the adultery law, arguing that diluting sanctions against infidelity would “result in laxity of the marital bonds”. The law had survived three previous legal challenges, the most recent in 1988.

The succession of high-profile cases provides a notable send-off for Misra, an at times controversial chief justice who has been the subject of public complaints from his fellow judges over his handling of politically sensitive cases.

The Delhi high court is currently examining another law that makes an exception for sexual assault if the perpetrator and victim are married. The government as well as several men’s rights groups have filed petitions against scrapping the marriage exception.

Karuna Nundy, a supreme court lawyer leading the case to overturn the marital rape law, said Thursday’s judgment bolstered her argument. “Both laws based on the doctrine of a man owning his wife, the wife being property,” she said.

Nundy said the court had shown in recent judgments that it now believed “sexually autonomy is not forfeited at the marital door”.