The Coalition is edging closer to the 76 seats it needs to have a majority in the parliament, with 74 at the end of counting on Saturday night. Labor was on 66.
The result defies months of opinion polls, including an exit poll taken from voters on Saturday afternoon, which consistently showed Labor ahead.
“I have always believed in miracles,” a jubilant Morrison told Liberal Party supporters in Sydney just after midnight.
He said it was a victory for the “quiet Australians”.
“Tonight is not about me or it’s not about even the Liberal Party. Tonight is about every single Australian who depends on their government to put them first.”
Labor bled votes in Queensland, NSW and Tasmania while a relatively strong showing from One Nation and Clive Palmer’s United Australia Party helped the Coalition.
Shorten conceded his party would not be able to form government.
“I wish we could have won for the true believers, for our brothers and sisters in the mighty trade union movement. I wish we could have done it for Bob,” he said, referring to the Labor legend and former prime minister who died on Thursday night.
But he urged Labor supporters to keep faith and carry on the fight.
“We are a resilient and proud movement and we never give up.”
He will step down from the leadership but stay on in parliament.
Senior frontbencher Anthony Albanese will run for the leadership and other potential contenders include deputy leader Tanya Plibersek and shadow treasurer Chris Bowen.
Morrison has been lauded as a Liberal hero who will now likely be able to lead the party in any direction he wants.
Senior Liberal strategist and senator Arthur Sinodinos says that should include borrowing parts of Labor’s ambitious policy agenda and re-thinking climate policy.
One of the biggest losers of the night was former prime minister Tony Abbott, who lost his seat of Warringah to high profile independent Zali Steggall.
Electoral commission staff counted about 11.5 million House of Representatives and 7.5 million Senate votes on Saturday night.
One Nation’s Malcolm Roberts and independent Jacqui Lambie will return to the Senate, but Palmer appears to have missed out despite spending millions on advertising.
Counting will continue on Sunday.
South Australia’s most marginal seat – Boothby, held by Liberal Nicolle Flint – is too close to call.
Help our journalists uncover the facts
In times like these InDaily provides valuable, local independent journalism in South Australia. As a news organisation it offers an alternative to The Advertiser, a different voice and a closer look at what is happening in our city and state for free. Any contribution to help fund our work is appreciated. Please click below to donate to InDaily.