Image copyright AFP/Getty Images Image caption Chi Chia-wei (centre, wearing rainbow flag) brought on the case with a court petition

A panel of judges at Taiwan's top court are hearing a case that could make the island the first place in Asia to introduce gay marriage.

The case has been brought by a gay activist as well as municipal authorities from the capital, Taipei.

Taiwan's parliament has also been debating whether to pass laws that would allow same-sex marriage.

The movement has split society and prompted a conservative backlash, with vocal protests in recent months.

A panel of 14 justices are hearing arguments and will debate whether a line in Taiwan's civil code, which states that marriage is between a man and a woman, is unconstitutional.

Media playback is unsupported on your device Media caption Taiwan's push to legalize same sex marriage

Veteran gay activist Chi Chia-wei, whose attempt at registering marriage with his partner in 2013 was rejected, had petitioned for the case to be heard.

Taipei city authorities, who have been receiving requests for gay marriage, had also petitioned for clarity.

Historic decision-making - Cindy Sui, BBC News, Taiwan correspondent

The hearing lasts only one day, but could be a decisive turning point in Taiwan's decades-long debate on whether to legalise same-sex marriage.

It's the first time the judiciary is opening the Constitutional Court on the issue. If the judges rule that Taiwan's current ban is unconstitutional, then parliament will be forced to amend the laws to offer gay couples protection.

Lawmakers, while initially supportive, have become less enthusiastic about passing such bills after vocal opposition by mainly religious groups and parents.

If the judges rule in favour of it, they will in essence be doing the dirty work for lawmakers, who can then tell their voters they have no choice but to amend the laws.

But it's still unclear how this would play out.

If same-sex marriage is approved, the LGBT community does not want a separate law to be created that only gives some protection to same-sex partners.

They want current family laws to be amended so that gay couples would be treated the same as heterosexual couples, as they would then get equal rights and treatment in all matters, including adoption of children.

Legal experts and government officials are taking part in the hearing, after which the justices will debate among themselves. The ruling is expected to come out in two months' time.

Gay rights campaigners carrying rainbow flags, turned up in front of the court in Taipei, as did anti-gay marriage protesters.

Image caption Conservative activists have also turned up protesting against same-sex marriage

In December Taiwan's parliament approved the first draft of a bill to legalise gay marriage, with a second reading due in months.

President Tsai Ing-wen has previously said she would support marriage equality. Taiwan is known for its progressive values and energetic LGBTQ movement.

But rallies by gay rights activists in recent months have been met with protests from conservative groups and calls for the same-sex marriage bill to be struck down.