Australia was prepared for a Labor victory on Saturday after a huge number of political polls predicted that outcome. So, what went wrong?
Polling experts and voters alike have been left baffled after the Coalition swept to an unexpected win on Saturday, flying in the face of weeks of opinion polls that predicted a Labor victory.
ABC election analyst Antony Green summed up the mood early in the night, when the Coalition began to buck the polling trends.
"At the moment, on these figures, it's a bit of a spectacular failure of opinion polling," he said.
Nearly all Newspoll, YouGov/Galaxy, Ipsos and ReachTEL polls - many which are connected to Australian news organisations - showed Labor ahead 51-49 on a two-party preferred basis right up until Friday night.
Federal opinion poll aggregate BludgerTrack 2019 - which draws from Newspoll, Galaxy, Ipsos, YouGov, Essential Research and ReachTEL polls - also had Labor at 51.7 per cent and the Coalition sitting at 48.3 per cent of the vote on a two-party preferred basis when it was last updated on Friday.
But as of Saturday afternoon, the Australian Electoral Commission had the Coalition at almost 51 per cent, to Labor's 49.
Political scientist Dr Andy Marks, who said earlier in the campaign that a Labor victory was "virtually unquestionable" based on polling, told SBS New the result shows how "worthless mainstream polling has become".
"I think this is really a cataclysmic era of polling in this country," he said.
"We've seen surprises with Brexit and with Trump in recent years, but generally Australia, due to compulsory voting and other more stabilising factors, hasn't really been exposed."
Tasmanian electoral analyst Kevin Bonham also described the events as a "massive polling failure", writing that it was looking like a "mirror image of the expected result".
As of Sunday, he told SBS News that there seemed to be a three per cent error across every poll in the past two weeks, which is far outside the usual margin for error.
"It's like one poll can be three per cent out and that's what you would sort of expect now and then by random chance. But all the polls being out by that amount in the same direction and getting all the same results is something that absolutely cannot happen by random chance," he said.
"It is is absolutely proof of a systematic issue."
The accuracy of pre-polling has come under fire in recent years, particularly after it massively failed to predict the results of the Brexit referendum in 2016 and Donald Trump's presidential victory in the US.
During the Brexit campaign, most polls suggested the "remain" side would come out on top but the final results saw the leave side win with a majority of more than one million votes.
Dr Bonham added that Saturday's results were a worse polling fail than what was seen in the US election, where the errors were in a small number of crucial states.
What went wrong?
According to Dr Bonham, a number of factors might have been at play, including unrepresentative samples, oversampling people who are politically engaged and herding (when polling firms adjust their results to more closely match competitors out of fear of being wrong).
And while compulsory voting may have protected Australia against inaccurate polling in the past, some experts believe it was also a contributor to what happened this time.
Writing in The Conversation on Sunday, University of Melbourne statistician Adrian Beaumont said people with higher education levels are more likely to respond to polls, potentially skewing the results.
When it comes to voluntary voting systems, this factor does not have as much of an effect as educated people are also more likely to be vote, he argued.
Due to the "suspicious" similarity in the poll results, Dr Bonham suggested pollsters were altering their results to stop them differing too much from their competitors.
"If they are doing true random sampling independent of each other, there is no way that they would all get results so close to each other at the same time," he said.
"We can't say which ones are doing it but we can say that that there is something fishy going on there."
Dr Marks, however, said the issues were largely due to the fact mainstream polling companies haven't been able to keep up with technology. Specifically, he said, the mobile age has affected pollster ability to generate random samples.
"The old idea of ringing up somebody on the landline and asking them who they'll vote for is redundant and has kind of been redundant, I think, for the last three or four years," he said.
According to Dr Marks, polling companies also failed to take into account the real-time sentiment displayed on social media when calculating their results.
This notion is supported by results from Griffith University's Big Data and Smart Analytics lab, which analysed two million social media comments in the days before the election and correctly predicted a Morrison victory.
"I was monitoring social media over the last month and I made many public statements saying that I don't see any grounds that Labor would win, despite the polls saying differently," director of the lab, Professor Bela Stantic, told the Sydney Morning Herald and The Age.
"I accessed millions of tweets and it was clear to me that apart from Victoria and South Australia, where Labor was ahead, there were no grounds for Labor taking over."
Is the era of mainstream polls over?
Greens leader Richard Di Natale thinks so.
"What it does show is that the era of opinion polls I think is over. They can't be trusted," he said on Saturday.
But Dr Marks believes there is room for innovation in the way polling is conducted. He said there needs to be a move away from analytics and algorithms to a more sentiment-centred approach.
"Polling needs to take more account of those factors that can't easily be rendered in percentage points, it needs to go down and drill down on the issues based attitudes in the electorate. We've seen again that played out in Queensland and it simply wasn't picked up by the old methods," he said.
"It's a case of having to get out from behind the computer screen and actually go and get a better gauge of sentiment as opposed to just the numbers."
Dr Bonham said it was impossible to say what needed to change, as the companies reveal little detail about how the polling is conducted.
It remains to be seen whether Australian media companies will move away from a reliance on polling firms, as was the case after the US election, following the latest embarrassment.
"Pollsters really need to reinvigorate and re-examine the way that they come up with reliability," Dr Marks said.