BANGKOK, June 15 — Thailand took a step towards marriage equality today as lawmakers gave initial approval to legalising same-sex unions, prompting celebrations outside the parliament building.

It is a significant landmark in a Buddhist-majority country with a highly visible LGBTQ community but whose members still face major barriers and discrimination.

The legislation must clear several more hurdles before becoming law. If it succeeds, Thailand would be the first country in Southeast Asia to recognise same sex unions.

The lower house approved two bills that would allow same-sex marriages and also two others that would permit civil partnerships.

A committee of lawmakers will now scrutinise the bills in detail and consolidate them into two proposals, to give MPs a choice between backing civil partnerships and full same-sex marriage.

After the vote a small but enthusiastic group of activists celebrated noisily outside parliament, weeping, hugging and waving rainbow flags.

"I am very happy and glad, it is a good sign in Pride month that there are MPs who want equality and vote for the bills," LGBTQ activist Nada Chaiyajit told AFP.

"But there is a long way to go."

Pita Limjaroenrat, the leader of the opposition Move Forward Party which proposed one of the same-sex marriage bills, said the vote should give people hope.

"Today is an answer that politics is possible here in Thailand," Pita told the celebrating activists outside parliament.

"No matter who you are, there is a place for you in this country."

Demands for marriage equality were a theme at Bangkok's Pride parade earlier this month -- the Thai capital's first such even in nearly 16 years.

Ryan Figueiredo, executive director of LGBT rights campaign group the Equal Asia Foundation, welcomed the vote but warned "there is a lot of work to be done on the ground in terms of moving the needle of public opinion and also talking to parliamentarians."

Figueiredo also urged the Thai parliament to back full marriage.

"Civil partnerships are not equal to marriage equality, it creates an entire different class of people," he told AFP.

"Civil partnerships seem like a consolation prize." — AFP