Australia's parliament has voted to allow same-sex marriage across the nation.

The House of Representatives passed the bill to change the definition of marriage from solely between a man and a woman to "a union of two people".

The parliamentary vote followed a non-binding postal survey in which Australians overwhelmingly voted in favour of the change, with a turnout of 79.5%.

The parliamentary votes were not counted because the majority was not questioned.

The law will likely 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.

The government has appointed a panel to examine how to safeguard religious freedoms once gay marriage is a reality in Australia.

It is now our job as members of Parliament to pass a fair bill that does not extend or create any new discriminations. It is a strong bill that already strikes the right balance between equality and freedom of religion. >

Warren Entsch MP

Penny Wong, an opposition Labor Party senator who has two children with her lesbian partner, said: "I am feeling happy."

The current bill allows churches and religious organizations to boycott gay weddings without violating Australian anti-discrimination laws.

The result is a political win for Malcolm Turnbull, who became prime minister after deposing Tony Abbott in 2015 in an internal government leadership ballot.

Abbott was head-butted by a gay rights advocate during the postal survey campaign in September.