© AFPSupporters of LGBT rights celebrate outside the parliament in Taipei on May 17
Taiwan's parliament legalised 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. © AFPThe law survived a last-minute attempt to water it down by conservative lawmakers
In recent months conservatives had mobilised 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 legalise same-sex marriage and to successfully open a new page in history," said the Taiwan Alliance to Promote Civil Partnership Rights.
Related: Key moments in LGBT rights history (Photos)
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 recognised 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 recognising 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 recognised 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 favour 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.