The ruling could make the island the first place in Asia to give same-sex couples the right to marry.

Taiwan’s top court ruled on Wednesday in favour of allowing same-sex marriage.

As reported by the BBC, the decision could pave the way for Taiwan to be the first place in Asia to legalise same-sex marriage.

In a press release following the ruling, the court said that “disallowing two persons of the same sex to marry, for the sake of safeguarding basic ethical orders” constituted a “different treatment” with “no rational basis.”

The court concluded that “such different treatment is incompatible with the spirit and meaning of the right to equality” as protected by Taiwan’s constitution.

This means that the island’s parliament, the Legislative Yuan, now has two years to amend or enact new laws.

According to CNN, Yu Mei-nu, a Taiwanese legislator said that the court’s decision means that even if lawmakers don’t pass legislation allowing same-sex marriage in two years, same-sex couples will be able to marry in 2019.

“I hope that the legislators will have the moral courage to pass same-sex marriage into law, however it is hard to predict how long it will take, at this moment,” she said. “The opposition toward gay marriage in Taiwan won’t just gladly accept it and give up the debate, so the debate will continue.”

Wayne Lin, chairman of the nongovernmental Taiwan Tongzhi Hotline Association, described the decision as a “milestone” for the country. “We feel that this is a huge success for the LGBT and marriage equality movement in Taiwan,” she said.

Executive director of the Beijing LGBT Center Ying Xin, said, “Without a doubt, Taiwan is walking in front of other Asian countries on this. This is significant for all of Asia.”

The Washington Post writes that gender and secual minorities still face stigma and discrimination in Taiwain, but school textbooks are positive towards the gay community and Taipei’s annual gay pride showcases the island’s attitude toward same-sex couples.

Taiwan’s first female president, Tsai Ing-wen, has been supported gay marriage even before her election in 2016.

“In the face of love, everyone is equal,” she said in a Facebook video during 2015’s gay pride parade. “I support marriage equality. Every person should be able to look for love freely, and freely seek their own happiness.”