Taipei: Taiwan has became the first place in Asia to legalise same-sex marriage despite deep divisions over marriage equality.

Despite heavy rain, thousands of demonstrators cheered and waved rainbow flags outside Parliament in the capital Taipei on Friday, some embracing tearfully while others hailed the vote with chants of "Asia's first", and "Way to go, Taiwan!

Same-sex marriage supporters cheer outside the Legislative Yuan in Taipei, Taiwan, on Friday. Credit:AP

MPs from the majority Democratic Progressive Party (DPP) backed the bill, which passed 66 to 27, though the measure could complicate President Tsai Ing-wen's bid to win a second term in presidential elections next year.

The bill, which offers same-sex couples similar legal protections for marriage as heterosexuals, will take effect after Tsai signs it into law.