(CNN) India's parliament has passed a bill criminalizing the controversial Muslim practice of instant divorce -- "triple talaq" -- and making it punishable with up to three years in prison.

The age-old practice, allows a Muslim man to divorce his wife by simply saying the Arabic word for divorce, "talaq", three times.

India's Upper House of Parliament passed the bill on Tuesday -- the third time the bill has come up for a vote in the upper house.

Indian Prime Minister Narendra Modi hailed the bill's passage on Twitter, writing : "I thank all parties and MPs who have supported the passage of The Muslim Women (Protection of Rights on Marriage) Bill, 2019 in both Houses of Parliament. They have risen to the occasion and this step of theirs will forever be remembered in India's history."

PM Modi further tweeted : "This is an occasion to salute the remarkable courage of those Muslim women who have suffered great wrongs just due to the practice of Triple Talaq. The abolition of Triple Talaq will contribute to women empowerment and give women the dignity they deserve in our society."

The bill becomes a law once it is signed by the president, considered a formality.

"This is historic because the reform in Muslim personal law has been mired in politics and patriarchy for several decades," Zakia Soman, co-founder of the Indian Muslim Women's Movement, also known as the Bharatiya Muslim Mahila Andolan (BMMA), told CNN.

"I welcome the law, while stating that the objective is not to punish the man, but to ensure justice and fair play to the victim woman," Soman said. "Nevertheless, a law would be meaningless without deterrence," she added.

But it drew criticism from some Muslim politicians, who described it as an assault on followers of Islam.

Asaduddin Owaisi, an MP from the opposition All India Majlis-e-Ittehadul Muslimeen party called the bill "as one part of many attacks on Muslim identity and citizenship".

#TripleTalaqBill should be seen only as one part of many attacks on Muslim identity & citizenship since 2014. Mob violence, police atrocities & mass incarceration won't bog us down



With a firm belief in the Constitution, we've withstood oppression, injustices & denial of rights — Asaduddin Owaisi (@asadowaisi) July 30, 2019

"Fail to understand the need to pass the triple talaq bill especially since the Supreme Court had already declared it illegal," tweeted Mehbooba Mufti, former chief minister of Jammu and Kashmir state. Mufti also branded the legislation "undue interference seemingly to punish Muslims".

The ruling Bharatiya Janata Party (BJP) government has also come under fire for failing to discuss the legislation before its introduction in Parliament.