SYDNEY - Australia became the 26th nation to legalize same-sex marriage on Thursday, prompting cheers and singing from a packed parliament public gallery in a country where some states ruled homosexual acts to be illegal until just 20 years ago.
Lawmakers, who had cast aside a conservative push to allow religious objectors to refuse service to same-sex couples, waved rainbow flags and embraced on the floor of the chamber, where earlier in the debate a politician had proposed to his same-sex partner.
Fewer than five of 150 MPs voted against the law.
"What a day. What a day for love, for equality, for respect," said Prime Minister Malcolm Turnbull. "...It is time for more marriages."
The laws, which will also recognize same-sex marriages solemnized in foreign countries, take effect from Saturday. Because a month's notice is required for the state to recognize a marriage, the first legal same-sex unions will be in January.
Australians had overwhelmingly endorsed legalizing same-sex marriage in a postal survey run by the national statistics agency.
The bill cleared the upper house last month and had been expected to pass on Thursday after Turnbull's Liberal-National coalition government and the main opposition Labor Party had previously said they wanted to pass it by Dec. 7.
But religious organisations and conservative lawmakers had voiced strong opposition and proposed dozens of amendments.
During parliamentary debate, they pressed for broad protections for religious objectors, among them florists and bankers, to refuse service to same-sex couples.
"These amendments, rather, are a shield for people and organisations that hold to a traditional view of marriage. They are not a sword to be wielded in the service of bigotry," government MP Andrew Hastie said in parliament.
Amendments to permit lay celebrants to decline to solemnise same-sex marriages and businesses opposed to the unions to refuse service at wedding receptions were all defeated, one after the other, during three days of debate.
"Love has won, and it's time to pop the bubbly," Greens MP and same-sex marriage supporter Adam Bandt said.