TAIPEI -- Taiwan's parliament legalized same-sex marriage on Friday in a landmark first for Asia as the government survived a last-minute attempt by conservatives to pass watered-down legislation.
Lawmakers comfortably passed a bill allowing same-sex couples to form "exclusive permanent unions" and another clause that would let them apply for a "marriage registration" with government agencies.
The vote -- which took place on the International Day Against Homophobia, Transphobia and Biphobia -- is a major victory for the island's LGBT community who have campaigned for years to have equal marriage rights and it places the island at the vanguard of Asia's burgeoning gay rights movement.
In recent months conservatives had mobilized to rid the law of any reference to marriage, instead putting forward rival bills that offered something closer to limited same-sex unions. But those bills struggled to receive enough votes.
Gay rights groups hailed the vote on Friday, saying the ability to apply for a "marriage registration" -- known as Clause Four -- put their community much closer to parity with heterosexual couples.
"The passage of Clause Four ensures that two persons of the same-sex can register their marriage on May 24th and ensure that Taiwan becomes the first country in Asia to legalize same-sex marriage and to successfully open a new page in history," said the Taiwan Alliance to Promote Civil Partnership Rights.
Two years ago Taiwan's top court ruled that not allowing same-sex couples to marry violates the constitution with judges giving the government until May 24, 2019 to make the changes or see marriage equality enacted automatically.
Other key sections of the law were still being debated and voted on Friday, including what, if any, provisions there will be for same-sex couples to adopt.
Whatever the result, the law will not bring full parity with heterosexual couples as even the most progressive version only offers biological adoptions.
Gay rights groups had previously indicated they were willing to accept compromises, as long as the new law recognized the concept of marriage, adding they could fight legal battles over surrogacy and adoption down the line.
"In Taiwan a marriage will take effect when it's registered, so allowing marriage registration is no doubt recognizing the marriage itself," Victoria Hsu, a gay rights lawyer, told AFP.
In the last decade, Taiwan has been one of the most progressive societies in Asia when it comes to gay rights, staging the continent's biggest annual gay pride parade.
But the island remains a staunchly conservative place, especially outside urban areas.
Conservative and religious groups were buoyed by a series of referendum wins in November, in which voters comprehensively rejected defining marriage as anything other than a union between a man and a woman, illustrating the limited popular support.
In a Facebook post President Tsai Ing-wen said she recognized the issue had divided "families, generations and even inside religious groups".
"Today, we have a chance to make history and show the world that progressive values can take root in an East Asian society," she added in a tweet ahead of the vote.
Tsai had previously spoken in favor of gay marriage but was later accused of dragging her feet after the court judgement, fearful of a voter backlash.
Taiwan goes to the polls in January.
Thousands of gay rights supporters gathered outside parliament for the vote, despite heavy downpours.
"We are just a group of people who want to live well on this land and who love each other," gay activist Cindy Su told the crowd.
But opponents were incensed by the vote, saying the inclusion of the "marriage registration" clause ignored the referendum.
Tseng Hsien-ying, from the Coalition for the Happiness of Our Next Generation, told local media the vote "trampled on Taiwanese people's expectations that a marriage and a family is formed by a man and a woman, a husband and a wife".
Australia and New Zealand are the only places in the wider Asia-Pacific region to have passed gay marriage laws.
Taiwan is the first place in Asia to do so.
Vietnam decriminalized gay marriage celebrations in 2015, but it stopped short of full legal recognition for same-sex unions.
© Agence France-Presse