Taiwan on Friday became the first place in Asia to legalize same-sex marriage, with lawmakers approving a government-sponsored bill that becomes law next week.

The draft same-sex marriage bill passed a third and final reading in a plenary session of the Legislative Yuan, or parliament.

Under the new law, which comes into effect on May 24, same-sex partners aged 18 and above will be eligible for registering their marriage at their household registration office.

To avoid controversy, the term "same-sex marriage" was changed to "the legal union between two same sex partners for the purpose of managing their life together."

Thousands of supporters of same-sex marriage cheered outside the parliament after the passage, while President Tsai Ing-wen also welcomed the move, saying on Twitter, "We took a big step toward true equality, and made Taiwan a better country."

She earlier tweeted, "Today, we have a chance to make history & show the world that progressive values can take root in an East Asian society."

Phil Robertson, deputy Asia director of the nongovernmental organization Human Rights Watch, also hailed Taiwan's ground-breaking passage of its marriage equality law.

"Incredible victory for LGBT rights, non-discrimination, respect, & families! Love wins again and again. Congratulations to the activists in Taiwan who won today!" he tweeted.

The Council of Grand Justices, the highest court in Taiwan, ruled on May 24, 2017 that the Civil Code, which stipulates that marriage is the legal union between a man and a woman, is unconstitutional.

It called for legal revision within two years.