Lawmakers in Taiwan have approved a bill legalizing same-sex marriage, a landmark decision that makes the self-ruled island the first place in Asia to pass gay marriage legislation.
The vote came almost two years after the island's Constitutional Court ruled that the existing law -- which said marriage was between a man and a woman -- was unconstitutional. The panel of judges gave the island's parliament two years to amend or enact new laws.
On Friday -- only a week off the two-year deadline -- lawmakers in Taiwan's Legislative Yuan passed a bill making same-sex marriage a reality. It will go into effect on May 24.
Although the island has a large gay community and its annual gay pride parade is the biggest in Asia, the issue of marriage equality has bitterly divided Taiwanese society. In a controversial referendum in November last year, 67% voted to reject same-sex marriage.
In recent months conservative groups have campaigned against same-sex marriage reform, pushing for a law that would see gay marriages redefined as something closer to same-sex unions.
Tens of thousands of people braved pouring rain Friday to demonstrate in favor of same-sex marriage outside the parliament, as lawmakers began voting on three draft bills, one tabled by the country's Cabinet -- which would ultimately prove successful -- and two watered-down rival bills tabled by conservative groups.
The successful Cabinet bill was the only one to use the word "marriage." It was backed by LGBTQ groups, despite the fact it could see same-sex couples denied rights enjoyed by hetrosexual couples, such as adoption and cross-national marriage.
Wu Tzu-an, a 33-year-old gay artist from Taipei, was among the crowds outside the parliament celebrating Friday.
"Today the result was the best we got for this stage," said Wu. "It's also a sign to show that Taiwan was different from China," he added, referring to mainland China where same-sex marriage has not been legalized. "Personally I don't have plans to get married, but I think it's a sign for equality."
Xiaogang Wei, a leading LGBT rights advocate in China who heads the Beijing Gender Health Education Institute, called the bill's passing a historic moment, not only for Asia but for the global LGBTQ rights movement.
"It will have a very positive impact on China's LGBT community, offering us a lot of hope," he told CNN.
"The Chinese government has pointed to cultural tradition as a reason for same-sex marriage being unsuitable in China. But the decision in Taiwan, which shares a cultural tradition with us, proves that Chinese culture can be open, diverse and progressive."
After the vote, Taiwan's President Tsai Ing-wen tweeted: "We took a big step towards true equality, and made Taiwan a better country."
LGBTQ rights in Asia
Taiwan's vote sets it apart from other parts of Asia where LGBTQ rights have regressed.
In mainland China, where homosexuality is legal but prejudices and discrimination against LGBT people persist under Communist Party rule, an author of same-sex erotic fiction was sent to jail for 10 years in November.
In April, the ruler of the tiny, oil-rich kingdom of Brunei announced he would introduce death by stoning for those convicted of gay sex . Sultan Hassanal Bolkiah has since said the death penalty will not be imposed, although he did not repeal the law.
In Indonesia, declining secularism has led to deepening discrimination against the country's gay, lesbian and transgender communities. Last year, two men accused of being gay received 87 lashes for gay sex in the country's conservative Aceh province.
More than two dozen countries around the world allow gay marriage, according to Pew Research.