Thailand took a step towards marriage equality Wednesday 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 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.

Activists and MPs celebrate after Thai lawmakers gave initial approval to legalising same-sex unions
Activists and MPs celebrate after Thai lawmakers gave initial approval to legalising same-sex unions AFP / Lillian SUWANRUMPHA

The legislation must clear several more hurdles before becoming law, but after Wednesday's 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 equaility and vote for the bills," LGBTQ activist Nada Chaiyajit told AFP.

"But there is a long way to go."

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.