Australia has voted in favour of backing legalisation of same-sex marriage.

Officials said over 61 percent supported the change in a nationwide postal survey after years of fierce public and political debate.

The vote result was widely predicted with political leaders saying beforehand that if the result was “yes” the legislation could be introduced to parliament within days.

However, there would then be controversy over what shape that bill would take.

Some politicians are calling for religious exemptions from the law, for those who do not want to preside over same-sex marriages for example.

It has been a complex political and legal issue that has divided public opinion.

The ruling conservatives made a second failed attempt to get the support of the Senate for a compulsory plebiscite on whether to allow same-sex marriage and then opted for the non-compulsory ‘postal vote’.

Critics, including gay rights groups, had urged the government to simply organise a conscience vote in parliament and let MPs decide the issue themselves, to avoid divisive campaigning.

Supporters of a plebiscite, however, argued that it was important that everyone had the right to have a say on the issue.

It is estimated the cost of holding a ‘postal ballot’ was about 122 million Australian dollars.

Prime Minister Malcolm Turnbull’s Liberal Party has led a coalition government since July 2016 and repeatedly rejected calls to scrap the election promise of putting the issue to a popular vote.

Turnbull had said he respected the views of those against same-sex marriage but that he would vote Yes and encourage others to do the same.

Latest opinion polls show about 60 percent of Australians support same-sex marriage.

Civil partnerships or registered relationships are already possible in most Australian states but they are not considered to be legal marriages.