Veteran gay rights activist Chi Chia-wei declared himself "cautiously optimistic" as the constitutional court began hearing a landmark case that could make Taiwan the first place in Asia to allow same-sex marriage

Taiwan's constitutional court heard a landmark case Friday that could make the island the first place in Asia to allow same-sex marriage.

A panel of 14 grand justices heard a debate over a disputed law that critics say is unconstitutional because it prevents unions between gay couples.

Campaigners for and against same-sex marriage gathered outside the court in Taipei, which was heavily guarded for the hearing.

Two petitions for a special interpretation of Taiwan's constitution were presented to the court by veteran gay rights activist Chi Chia-wei and the Taipei city government, which has been receiving a growing number of requests to register same-sex marriages.

The Taipei government's representative Liao Yuan-hao argued legally allowing gay unions would "not change the essence of marriage, but would solidify its values".

"Society recognises gay people have the same needs. They are normal people wanting to build normal relations and the law should include them," he told the court.

At the centre of the case is a clause in Taiwan's Civil Code which says an agreement to marry should be made between a man and a woman.

Authorities in Taiwan have been rejecting applications for same-sex marriages based on this clause.

The petitioners want the court to rule whether that part of the Civil Code contravenes elements in Taiwan's constitution which guarantee equality and freedom of marriage.

But justice minister Chiu Tai-san argued the code does not violate the constitution because it does not specifically bar same-sex unions.

He also said more time needed to be taken to achieve a wider consensus on gay marriage in Taiwan.

"Abruptly changing (the law) will impact social order," Chiu added.

- Cautious optimism -

Taiwan's constitutional court will hear arguments over whether part of the Civil Code contravenes elements in Taiwan's constitution that guarantee equality and freedom of marriage

The hearing came after the first draft of a bill to legalise gay marriage was passed by Taiwan's parliament in December.

That bill is now due for a second reading.

But the process could be overtaken by the court ruling, which is expected within two months.

"The constitutional court's decision is legally-binding," Hsieh Kuo-lien, a law professor at National University of Kaohsiung, told AFP.

"If its decision is favourable to gay rights activists, it would be effectively legalising same-sex marriage."

Taiwan is considered progressive on many issues including gay rights, but its roots in Confucianism translate into a strong sense of adherence to traditional mores.

There has been growing momentum behind the campaign to change the law.

However, the debate has also split society, with conservative groups saying allowing same-sex unions would destroy family values.

Both sides have staged huge marches in recent months, with tens of thousands taking to the streets.

Outside court Friday gay rights supporters waved rainbow flags while opponents chanted "marriage is between a husband and wife".

Activist Chi brought the petition to the constitutional court after multiple failed legal bids to seek recognition of his marriage.

While a growing number of western jurisdictions are recognising same-sex marriage, Taiwan would become the first place in Asia to follow suit

"I am cautiously optimistic as the world trend is to recognise same-sex marriage and the grand justices are unlikely to bar it," Chi told AFP ahead of the hearing Friday.

Past attempts to legalise same-sex marriage stalled under the Kuomintang party, which dominated politics for decades until it was unseated by President Tsai Ing-wen's Democratic Progressive Party last year.

Campaigners were given new hope when Tsai was elected as she has openly supported marriage equality.