Taiwan's Parliament voted on Friday to legalize gay marriage, becoming the first Parliament in Asia to do so, the BBC reports.

Lawmakers weighed three separate bills to move ahead with legalizing same-sex unions, and ended up moving ahead with the government's bill, which has been described as the most progressive of the three. Taiwan's Supreme Court ruled that gay marriage should be legal back in 2017, and set a two-year deadline for Parliament to pass the changes into law. But this provoked a public backlash that ended with a series of referendums on the issue. The referendums showed that a majority of voters didn't want to legalize same sex marriage. Ultimately, lawmakers compromised and decided not to alter the existing definition of marriage, and instead passed a special law allowing same-sex marriage

The government's bill was passed, 66-27, and was backed by lawmakers from the majority Democratic Progressive Party. It will take effect as soon as President Tsai Ing-wen passes it into law, allowing full equality for same-sex marriages and even clearing the way for limited adoption rights.

President Tsai celebrated the vote on Twitter.

Good morning #Taiwan. Today, we have a chance to make history & show the world that progressive values can take root in an East Asian society.



Today, we can show the world that #LoveWins. pic.twitter.com/PCPZCTi87M — 蔡英文 Tsai Ing-wen (@iingwen) May 17, 2019

On May 17th, 2019 in #Taiwan, #LoveWon. We took a big step towards true equality, and made Taiwan a better country. 🏳️‍🌈 — 蔡英文 Tsai Ing-wen (@iingwen) May 17, 2019

Gay rights activists throughout the region also celebrated the victory, saying Taiwan had set an example for other developed Asian nations, including Singapore. Elsewhere in Asia, lawmakers are growing increasingly tolerant of the LGBTQ community, with India's Supreme Court ruling that gay sex is no longer a criminal offense.