Australians have voted overwhelmingly for same-sex marriage, paving the way for legislation by the end of 2017 and sparking colorful celebrations on Wednesday.

Australia will become the 26th nation to formalize gay marriage if the legislation is passed by parliament, which is expected despite some vocal opposition from the government’s conservative right wing.

Thousands in a central Sydney park broke into a loud cheer, hugged and cried as Australia’s chief statistician revealed – live over a big screen – that 61.6% of voters surveyed favored marriage equality, with 38.4% against.

Australian Olympic swimmer Ian Thorpe, who came out as gay three years ago, said the result was a huge relief. “It means that the way you feel for another person, whoever that may be, is equal,” he told reporters at the Sydney celebrations.

The voluntary poll is non-binding, but Prime Minister Malcolm Turnbull immediately said he would fulfill a pledge to raise a bill in parliament with the aim of passing laws by Christmas.

He also played down concerns of a split in his coalition government over the policy as the conservative faction presses for amendments to protect religious freedoms that discriminate against same-sex couples. “It is unequivocal, it is overwhelming. They have spoken in their millions and they have voted overwhelmingly yes for marriage equality,” Turnbull told reporters in Canberra after the survey results were announced. “They voted yes for fairness, yes for commitment, yes for love.”

The result marks a watershed moment for gay rights in Australia, where it was illegal in some states to engage in homosexual activity until 1997.

“It’s a g’day. Way to go Australia,” tweeted US TV host Ellen DeGeneres, who is married to Australian actress Portia de Rossi in the United States.

Almost 80% of the country’s eligible voters took part in the survey – a higher voter turnout than in Britain’s Brexit vote and Ireland’s same-sex marriage referendum.

Turnbull troubles

Irish-born Qantas Airways Chief Executive Alan Joyce, one of the few openly gay business leaders in Australia, told the Sydney crowd – many of whom sheltered from the hot sun under rainbow umbrellas – that the result was “an amazing outcome” and urged Turnbull to move quickly on legislation.

Turnbull, under pressure amid a citizenship crisis that has cost him his deputy and the government’s majority in parliament, may well find his leadership tested again as a marriage equality bill is put before parliament. Conservatives’ planned amendments would allow private businesses to refuse to provide services such as wedding cakes for same-sex weddings if they object on religious grounds.

Political analysts said, however, that the resounding “yes” vote presented Turnbull with his first opportunity in months to exert decisive control. At least one lawmaker who opposed the change has announced plans to switch to supporting the legislation, given the strength of the public vote.

“It is unequivocal, it is overwhelming. They have spoken in their millions and they have voted overwhelmingly yes for marriage equality. They voted yes for fairness, yes for commitment, yes for love”

Nick Economou, a political scientist at Monash University, said Turnbull “should feel emboldened by the result and this is the sort of thing he has been looking for to show some assertive leadership”.

Catholic Archbishop of Sydney Anthony Fisher said he was “deeply disappointed that the likely result will be legislation to further deconstruct marriage and family in Australia.”

At a ‘No’ event in Sydney, Lyle Shelton, spokesman for the Coalition for Marriage, a campaign group, said: “I think it’s important to realise and to recognise that the Yes campaign said all along there were no consequences in redefining marriage — this won’t affect anyone else’s freedoms — so I expect the legislative process to reflect that.

“I don’t think anyone who voted in this postal survey wants to see their fellow Australians put up on hate speech charges. So I think we need to protect freedom of speech, we need to protect freedom of conscience and also freedom of religion and of course that goes way behind a wedding ceremony.”