Taiwan’s parliament voted Friday to legalize same-sex marriage, making it the first place in Asia to do so.

Taiwan’s President Tsai Ing-wen, who’s led the self-governing island since 2016, must still sign the legislation, which she’s expected to do. Tsai had campaigned on marriage equality, and the bill was largely supported by her Democratic Progressive Party in parliament.

“We took a big step towards true equality, and made Taiwan better,” the president wrote on Twitter, after parliament’s vote.

Advocates and supporters of same-sex marriage awaited the results of the vote outside parliament, and celebrated and cheered Friday when it was announced that it had approved the legislation.

Taiwan’s path to legalizing same-sex marriage began in 2017, when its top court ruled the law that defined marriage as between a man and a woman was illegal and that it violated the “people’s right to equality.”

The moment marriage equality passed in Taiwan today ♥️ @lborogeog pic.twitter.com/UOAcyBddud — Sarah Holloway (@ProfSLHolloway) May 17, 2019

The court set a two-year deadline for the government to amend its laws, or same-sex marriage would automatically go into effect by May 24, 2019.

But the debate over same-sex marriage, both in parliament and in the public, was deeply contentious. In November 2018, Taiwanese voters rejected same-sex marriage in a referendum. The referendum was nonbinding and didn’t change the court’s ruling, but it was a setback for advocates and supporters of marriage equality and put pressure on lawmakers who feared a backlash.

Ahead of the May deadline, conservative legislators in Taiwan’s parliament tried to push bills that avoided legalizing same-sex marriage outright, instead establishing “same-sex family relationships” or “same-sex unions,” according to the BBC.

The legislation that eventually passed, which was backed by the president and her party, allows same-sex couples to apply for “marriage registration.” It makes same-sex marriage legal, but, as the Washington Post reported, it still exists outside the current civil code that governs heterosexual couples. This was done, per the Post, “to comply with the 2017 court ruling as well as the November 2018 referendum.”

The bill also included provisions for limited adoption rights, and will extend some tax and insurance benefits to same-sex married couples.

But even as gay-rights advocates celebrated Taiwan’s vote, some said the law still didn’t go far enough and failed to provide full equality.

Chen Ming-yen, a lawyer and activist at the Taiwan Alliance to Promote Civil Partnership Rights told the Wall Street Journal that the law was “the bottom line of all bottom lines” and that “anything less than this would be deemed unconstitutional.”

Yet it was still a victory, even if an imperfect one, especially for a region that has been slow to adopt LGBTQ protections. Taiwan has been one of the more progressive places in Asia in regards to gay rights, and has long hosted the biggest gay pride parade in the region.

Other countries have made some halting progress. For example, Thailand drafted a bill allowing same-sex civil partnerships last year. But a gay-rights activist in Hong Kong told the BBC that she didn’t think Taiwan’s decision would make a difference in more conservative places like mainland China and Hong Kong. China decriminalized homosexuality in 1997, though the Chinese government has continued at times to crack down LGBTQ advocacy.

But advocates still see the legalization of same-sex marriage in Taiwan as offering an example for the rest of the region. As Jay Lin, a media executive who is gay and the father of two children, told the Washington Post, Taiwan’s new law was a “beacon of hope.”