India's parliament passed on Tuesday a law against the controversial Muslim practice of "instant divorce", making it a criminal offence punishable by up to three years in prison.
Prime Minister Narendra Modi's Hindu-nationalist government pushed through the bill despite stiff resistance from several opposition parties and a previous failed attempt to move the bill in the upper house.
"An archaic and medieval practice has finally been confined to the dustbin of history," Modi tweeted after the bill finally cleared the upper house.
"Parliament abolishes Triple Talaq and corrects a historical wrong done to Muslim women. This is a victory of gender justice and will further equality in society. India rejoices today!"
Instant divorce, or "triple talaq," is when a Muslim man ends his marriage by simply saying "talaq" -- which means "you are divorced" in Arabic -- three times in succession.
The Supreme Court declared the practice unconstitutional in 2017 and asked the government to legislate against it.
Modi held a sizable lower house majority in his first term when he first attempted to outlaw it, but did not have sufficient upper house support to pass the law.
Following his resounding victory in general elections in May, his government sought to pass the contentious legislation against a significantly weakened and dispirited opposition, even as several opposition parliamentarians argued against making divorce a criminal act.
The law, which was passed by the lower house last week, will come into effect after receiving a formal nod from the president in next few days.
Besides a jail term and a fine, the law will require Muslim men to financially support their wives, who will also get custody of their children.
The 2017 high court ruling came after several Muslim women petitioned the top court, arguing that the unilateral power of Muslim men to end marriages violated India's constitution by infringing on their fundamental right to equality.
Muslim women say they have been divorced via letters or messaging apps like WhatsApp, leaving them without any legal remedy.
India has no uniform civil law for marriage, divorce and property.
Its constitution allows followers of each faith to use their religious laws to govern such matters, including 180 million Muslims, the largest religious minority in the Hindu-dominated country.
Modi's Bharatiya Janata Party (BJP) has long pushed for a uniform civil code to be enforced in India.
India's minorities have opposed such moves, arguing it will erode their constitutional freedom of religion.