AUSTRALIA’S parliament has voted to allow same-sex marriage across the nation.

The decision follows a bitter debate settled by a government survey of voters that strongly endorsed change.

The public gallery in the House of Representatives erupted with applause when the Bill passed.

It changes the definition of marriage from solely between a man and a woman to “a union of two people” excluding all others.

The legislation passed with a majority that was not challenged, although five politicians registered their opposition.

The Senate passed the same legislation last week 43 votes to 12.

After royal assent and other formalities, the law is likely to take effect in about a month, with the first weddings expected about a month later.

Amendments meant to safeguard freedoms of speech and religion for gay-marriage opponents were all rejected, though those issues may be considered later by a government-appointed panel.

Gay marriage was endorsed by 62 per cent of voters who responded to the postal ballot.

Most gay rights advocates believed the government should have allowed marriages years ago and saw various ideas for a public survey as a delaying tactic.

The UN Human Rights Committee had called the ballot survey “an unnecessary and divisive public opinion poll”.