Liberal Party faithful came expecting a funeral and found themselves at a coronation.
Hundreds of diehards erupted in cheers after learning the coalition was poised to win a third term in government.
All eyes were glued to big screens in a ballroom of the Sofitel Hotel in Sydney as the surprise results rolled in.
"This is massive," one shocked supporter said.
"If Scott (Morrison) wins, the party should build him a monument."
The coalition appears on track to secure a slim majority after being written off by pundits and pollsters.
"It really is much better than we thought," one supporter told AAP, echoing a refrain ringing out across the ballroom.
Former prime minister John Howard arrived at the function around 10pm, by which time it was rapidly becoming a celebration of a come-from-behind win.
He said Bill Shorten made a "terrible mistake" by making the election about class.
"You might even say I banged on a bit about this in the campaign. It is a salutary lesson," Mr Howard told reporters.
"It's interesting he invoked Bob Hawke a lot. I understand that, Bob Hawke is a great Labor prime minister, but he didn't try and divide the country on class.
"This big end of town stuff. You're all the big end of town if you make a few bob."
Mr Howard said the prime minister commanded a special place in the party's history.
"Whatever the ultimate result is, Scott Morrison has won enormous respect in the Liberal Party family and he will occupy a very special place in the pantheon of the Liberal Party."
The coalition vote is holding firm in Queensland and the Liberals could pick up two seats in Tasmania.
Under-threat ministers David Coleman and Greg Hunt appear to be safe, and Peter Dutton has secured his seat.
The Liberals have also held off fierce challenges in several key NSW contests.
Liberal insiders are confident of fending off challenges in the Western Australian seats of Hasluck and Pearce, with Swan and Stirling still in play.
The coalition could also pull off an upset victory in the Northern Territory electorate of Lingiari.
"It's a great day to be a Liberal," one supporter said.
One woman booed when Tony Abbott, who lost his seat of Warringah, flashed up on screen.
"I forgot where I was," she explained, before adding she was booing his loss.
But Mr Howard said the former prime minister had served the country well.
"I'm truly sorry. Tony is a dear friend of mine, he's made an enormous contribution to Australia," he said.
"He's one of only four people to lead the Liberal Party back into government from opposition and I thank him for his service to the nation.
"I thought his concession speech tonight was the epitome of grace. "
Prime Minister Scott Morrison will address the crowd later on Saturday night.
Australian Associated Press