Australian MPs burst into song after a historic bill legalising same-sex marriage was passed in the House of Representatives.

The move comes one month after 61.6 per cent of Australians voted in favour of the change.

The announcement was met with cheers and even a song, as onlookers sang “I am Australian” while waving rainbow flags.

“We are one, but we are many,“ they sang, with several politicians joining in. “And from all the lands on earth we come. We’ll share a dream and sing with one voice. I am, you are, we are Australian.”

Australia’s governor-general is expected to approve the bill within a few days, marking its passage into law.

“What a day for love, for equality, for respect. Australia has done it,” Australian Prime Minister Malcolm Turnbull said after the country became the 26th country in the world to legalise same-sex ceremonies.

“This is Australia, fair and diverse, loving and filled with respect.”

Votes were not counted because the majority was not questioned, but fewer than five MPs registered their opposition. The Senate passed the same legislation last week by 43 votes to 12.

The laws, which will also recognise same-sex marriages solemnised in foreign countries, will take effect from Saturday.

But because a month’s notice is required for the state to recognise a marriage, the first legal same-sex unions will be in January.

Religious organisations and conservative lawmakers voiced strong opposition and proposed dozens of amendments to law, pressing during parliamentary debate for broad protections for religious objectors, among them florists and bankers, to refuse service to same-sex couples.

But the amendments were all defeated during three days of debate, although the issues may be considered at a later date.