In a landmark first for Asia, Taiwan’s parliament legalized same-sex marriage on Friday as the government survived a last-ditch attempt by conservatives to pass weaker 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 massive win for the territory’s LGBT community and it places the island at the forefront of Asia’s growing gay rights movement.

Despite heavy rain, thousands of gay rights supporters gathered outside parliament, waving rainbow flags, flashing victory signs and cheering loudly as the news came out.

In recent months, conservatives had tried to remove any reference to marriage from the law, 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 – brings 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 24 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.

Court order

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 to make the changes or see marriage equality enacted automatically.

The law does not bring full equality with heterosexual couples – it only allows for biological adoption, for example, and marriages with foreigners are not recognized.

But gay rights groups have said they were willing to accept compromises, as long as the new law recognized the concept of marriage, adding they could fight further legal battles over surrogacy and adoption in the future.

“For me, the outcome today is not 100% perfect, but it’s still pretty good for the gay community as it provides legal definition,” Elias Tseng, a gay pastor who was among the crowds outside parliament, told AFP.

Victoria Hsu, a gay rights lawyer, said it was crucial that conservatives failed in their bid to delete the reference to marriage registration with lawmakers voting 66-27 in favor of the provision.

“In Taiwan, a marriage will take effect when it’s registered, so allowing marriage registration is no doubt recognizing the marriage itself,” she told AFP.

The first marriages are expected to be registered next Friday, the date the court set for their deadline.

– with reporting by AFP