TAIPEI – Taiwan’s top judges Wednesday ruled in favour of gay marriage, paving the way for the country to become the first nation in Asia to legalize same-sex unions.

In a press release following the ruling, Taiwan’s top 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.

It gave the legislative assembly two years to amend existing laws or pass new ones, the BBC reported.

The LGBT community hopes legislators will simply amend the existing marriage laws to include same-sex couples, which would grant them the same rights enjoyed by opposite-sex couples, including in cases of adoption, parenting and inheritance – and making decisions for each other in medical emergencies.

However, they fear parliament won’t do that and will instead pass a new law that recognises same-sex marriages but gives them only some rights, not equal treatment in all matters.

Religious and parents groups opposed to gay marriage say they will lobby parliament not to pass any laws on legalisation. They argue such an important matter that affects the whole of society shouldn’t be decided by just a few grand justices, but by the people in a referendum.

Self-ruled Taiwan, over which China claims sovereignty, is known for its liberal values and holds the biggest annual gay pride event in the region.

A bill to legalise same-sex marriages is already making its way through parliament, but that process has slowed because of opposition from traditionalists, who do not want Taiwan to become the first place in Asia to allow such weddings.