Polls had long shown Australians supported same-sex marriage, yet the results of a national vote have generated intense discussion. Political scientist Dr Shaun Ratcliff explores how predictions got it right, and why some areas voted the way they did.
At 10:00 on Wednesday 15 November, the chief statistician of the Australian Bureau of Statistics (ABS) announced that 61.6% of voters supported a change to the Marriage Act.
This represented the near culmination of a process years in the making that will (presumably) result in the legal recognition of same-sex marriages once parliament passes legislation to that effect (promised by the end of the year).
Why was it the chief statistician who announced these results, and why did Australia have a public vote on this issue? A vote was not required by the constitution, as it was in Ireland in 2015. Nor does Australia have a tradition of votes to resolve policy issues, as many American states for example do.
Rather, it was held, largely, to resolve tensions within the incumbent centre-right Liberal-National coalition government.
Within the parties that make up the coalition, most MPs oppose same-sex marriage, although a significant minority within the Liberal Party (the senior coalition partner) are strong supporters. The issue functions also in part as a proxy for ongoing competition between Liberal Party moderates and conservatives, and over the party's leadership and its future.
This opposition to same-sex marriage has put the coalition increasingly at odds with the public over the last decade. Since 2007, Australian public opinion polls have indicated that most Australian citizens support same-sex marriage.
To resolve this impasse, high-profile same-sex marriage supporter and current coalition Prime Minister Malcolm Turnbull organised for the ABS to conduct a voluntary, non-binding national vote.
The result received was not a surprise. In contrast to recent upsets, polling on this issue was almost spot on. Essential polls conducted in September and October predicted support between 62% and 66%, a Newspoll survey conducted in mid-October predicted 59%, while YouGov predicted 65%.
Polls did well - compared to the likes of Brexit and the 2016 US presidential election - in part because the turnout was so high (approximately 80%, compared to 61% in the Irish gay marriage referendum).
This is probably driven by the compulsory voting Australia has for general elections, which socialises citizens into the norm of turning out and voting.
Why did diverse western Sydney vote against?
Although the overall level of support for same-sex marriage was high, there was significant variation. When we dig into the data, western Sydney stands out. In the middle/outer west of Australia's largest metropolitan area, there were five divisions with some of the lowest support in the country. In one of these, Blaxland, support was as low as 25%.
Some Australian media reports have suggested that diverse ethnic communities in these electorates were responsible for the large No vote, with substantial Muslim populations cited in some cases.
However, this is only part of the story.
A better explanation is the presence of a larger than average proportion of voters who are religiously affiliated at all.
In the seat of Mitchell, which has a miniscule Muslim population but a somewhat larger than average Christian population, support for same-sex marriage was also below 50%.
Besides religion and diversity, one of the major identifiers of the five western Sydney electorates mentioned above is that they are all very safe Labor Party (centre-left) seats.
Two of them are electorates that were held by past Labor prime ministers (Werriwa was represented by Gough Whitlam from 1952-1978, although on quite different boundaries; Blaxland by Paul Keating between 1969 and 1996).
While some Labor-held seats had high levels of opposition to same-sex marriage, this does not mean they will vote for a conservative party in the future.
Voters make their choice of which party and candidate to support at a general election for a variety of reasons, balancing a number of issues off against each other. In the end, many generally vote Labor for economic reasons.
This is also why the electorate of Warringah on Sydney's affluent north shore votes for socially conservative (and former Liberal prime minister) Tony Abbott, even though it overwhelmingly supported same-sex marriage by 75%. Mr Abbott was a leading figure in the No campaign against allowing same-sex unions.
In neither case is it likely that the marriage survey will have major ramifications at a general election, though the political tensions within the coalition (and the associated leadership issues) may well continue to play out as the legislation to legally recognise same-sex marriage works its way through parliament.
Dr Shaun Ratcliff is a lecturer in political science at the United States Studies Centre at the University of Sydney.