The constitutional court had given parliament two years to come up with legislation on same-sex marriage, after ruling that gay couples had the right to legally marry.
But matters were complicated by a series of referendums in November in which voters convincingly rejected defining marriage as anything other than a union between a man and a woman.
Three possible bills were debated, including two by conservative groups that referred to same-sex “civil-unions” or “family relationships” rather than marriage. These were rejected, and the most progressive of the three was passed.
The successful bill includes limited adoption rights for same-sex couples. It was tabled by the government and begrudgingly backed by gay rights campaigners, who see it as falling short of full equality but at least a step in the right direction.
Thousands of gay rights supporters gathered outside parliament in Taipei on Friday during the debate, awaiting the landmark vote.
And fighting through the heavy rain, demonstrators embraced tearfully and celebrated with chants of “Asia’s first,” and “Way to go, Taiwan!”
President Tsai Ing-wen – whose party holds the majority in parliament – recognised the issue had been divisive but said in a Facebook post that the government’s bill was the only option to respect both the court ruling and the referendum.
She wrote on Twitter on Friday morning: ”Today, we have a chance to make history and show the world that progressive values can take root in an East Asian society.”
Friday’s measure could prove a challenge to Tsai’s bid for a second term in a January presidential election, after a poll defeat last year for her DPP was blamed partly on criticism of her reform agenda, including marriage equality.
“The will of some seven million people in the referendum has been trampled,” one conservative group, the Coalition for the Happiness of Our Next Generation said in a statement. “The massive public will strike back in 2020.”
Additional reporting by agencies
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies