Mr Shorten announced he would stand down as Labor leader while staying in Parliament, adding the federal election campaign had been «toxic at times» but that Labor had fought for ambitious change.
The election result was yet to be finalised at the end of election night, with several seats in doubt, but the Coalition defied the opinion polls to hold its ground and win seats from Labor.
With almost three quarters of the vote counted, the Coalition had 74 of the 151 seats in the House of Representatives and was within sight of forming government in its own right or with support in a hung Parliament.
The Prime Minister said the election was a victory for the «quiet Australians» rather than about the Liberal Party or himself.
«Tonight is about every single Australian who depends on their government to put them first,» he said.
«That is exactly what we are going to do. Our government will come together after this night and we will get back to work.
«That is our task and that is my undertaking to Australians from one end of the country to the other.
«I said I was going to burn for you and I am – every single day.»
Mr Shorten singled out Labor deputy Tanya Plibersek, shadow treasurer Chris Bowen and Senate leader Penny Wong for praise in a concession speech to party supporters in Melbourne.
«I know that you’re all hurting and I am too,» Mr Shorten said.
Two days after the death of Labor hero Bob Hawke, Mr Shorten said he had wanted to achieve victory for Australians who needed better healthcare, an expanded Medicare, greater school funding and other policies.
«Gee, I wish we could have formed a government for these Australians on this evening. I wish we could have won for the true believers, for our brothers and sisters in the mighty trade union movement,» he said.
«I wish we could have done it for Bob.»
Mr Morrison, who won the leadership after Malcolm Turnbull was deposed in a leadership coup last August, was on track in late counting to secure the 76 seats needed to form government and secure one of the most impressive victories in the Liberal Party’s history.
Mr Morrison’s presidential-style campaign focussing on income tax cuts and risks to the economy under Labor led the Coalition to significant gains in Queensland and Tasmania while limiting losses NSW and Victoria. His staunch opposition to Mr Shorten’s plans to tax higher-income earners appears to have resonated with voters living outside inner-city seats.
Home Affairs Minister Peter Dutton celebrated his victory over Labor candidate Ali France in the Queensland seat of Dixon by quoting former Labor prime minister Paul Keating.
«This is the sweetest victory of all,» Mr Dutton said, before paying tribute to Mr Morrison.
«He’s been able to campaign in marginal seats, he’s been able to put pressure on Bill Shorten, and it’s what Bill Shorten deserved.»
Labor leader Bill Shorten had been a warm favourite and made gains in some seats in NSW and Victoria, while independent candidate Zali Steggall defeated former prime minister Tony Abbott in Warringah. However, the result represents a devastating defeat for the former union leader whose position as leader of the ALP is now in grave danger.
His bid to become Australia’s 31st Prime Minister — through an ambitious platform of tax, wages and climate policy reform — receded as election night went on.
Labor infrastructure spokesman Anthony Albanese acknowledged the opposition had a «redistributive agenda» by increasing some taxes to fund health and education, as well as taking action on climate change and do more for indigenous Australians. Mr Albanese praised Mr Shorten and accepted responsibility for the outcome as a member of the frontbench team.
Mr Albanese blamed a Coalition «scare campaign» for the outcome, a view also put by Labor deputy leader Tanya Plibersek.
The Coalition, which has trailed Labor in the polls throughout its turbulent time in government, went in to the campaign with 74 seats and added to that tally across Queensland, where it defeated Labor in Longman and Herbert. Queensland was a disaster for Labor which recorded a 26.6 per cent primary vote in the Sunshine State.
The Coalition also wrested the Tasmanian seat of Braddon from Labor and appeared likely to claim the neighbouring electorate of Bass as well.
With the electorate enduring more than a decade of unprecedented parliamentary bloodletting — Australia has had seven Prime Ministers in 11 years — many neutral observers were hoping for a period of political stability.
However, the result shows the nation is divided along geographic and ideological lines with Mr Abbott declaring a political «realignment» with Labor making gains in progressive wealthy seats and the Coalition doing better in working class areas. A group of key independents could still hold the key to power.
Mr Abbott said the Coalition would be able to retain government even though he conceded he would lose his seat of Warringah, a safe Liberal electorate for years that came under attack from independent candidate Zali Steggall and her campaign for more action on climate change.
«The good news is that there is every chance the Liberal National Coalition has won this election,» Mr Abbott said.
«This is a really extraordinary result, it is a stupendous result, it is a great result for Scott Morrison and the rest of the Liberal team, and Scott Morrison will quite rightly enter the Liberal pantheon forever.»
In western Sydney, the electorate of Lindsay fell to the Liberals while the neighbouring electorate of Macquarie appeared to be shifting in the same way. In eastern Sydney, the Liberal Party was confident of regaining the blue-ribbon seat of Wentworth with Liberal candidate Dave Sharma ahead of independent MP Kerryn Phelps, who gained the seat at a byelection last year.
The outcomes give the Coalition a narrow majority in the House of Representatives unless it suffers the loss of other seats.
Labor gained the seat of Gilmore on the NSW South Coast and the two Victorian seats of Chisholm and Dunkley.
Former Liberal Prime Minister John Howard said Mr Shorten had «overplayed the class warfare thing» in his message to voters and that there had been a «whiff of 1993» about the outcome.
While the Liberal Party appeared likely to regain Wentworth, independent MPs made gains elsewhere with Victorian independent Helen Haines on track to win Indi and succeed former independent MP Cathy McGowan.
Combined with the victory for Ms Steggall, the election appears to leave Parliament with a crossbench that includes Greens MP Adam Bandt, Tasmanian independent Andrew Wilkie, Queenslander Bob Katter, South Australian Rebekha Sharkie as well as Ms Steggall and Dr Haines.
Mr Wilkie has ruled out doing any deal with a minority government while Mr Katter has backed the Coalition in the past. Others have named climate change policy as a factor in their decisions on whether to support a minority government on votes of confidence and supply.
The government’s 74 seats in the House of Representatives was down from the 76 it won at the last election due to the departure of former Liberal MP Julia Banks to the crossbench and the arrival of independent MP Kerryn Phelps in Wentworth. Labor started with 69 seats from the last Parliament.
Labor described its election effort as its largest «field campaign» in history, putting more than 25,000 volunteers into the field to knock on more than one million doors. Labor claimed its supporters made more than one million phone calls to urge Australians to back their party.
Activist group GetUp said it had mobilised more than 9000 volunteers who had worked on the ground, with a wider group of helpers making more than 700,000 phone calls during the campaign.
The ACTU had about 5000 volunteers working during the campaign.
Mr Shorten began the final day of the campaign by urging Australians to change the government because Labor would act on climate change, spend more on health, restore stability after the leadership division within the Liberal Party and improve fairness by scaling back tax concessions for the wealthy.
He visited Melbourne electorates after an early morning run wearing a t-shirt that asked people to vote for «Chloe Shorten’s husband» – an acknowledgement of his wife’s importance to his campaign.
Mr Morrison campaigned at a more hectic pace by flying to Tasmania on Saturday morning to woo voters in the marginal seat of Bass before heading to Sydney for the remainder of the day.
The Coalition adopted the same approach the previous day with a relentless tour through Queensland marginal seats.
The election campaign ended on a subdued note after the death of former prime minister Bob Hawke on Thursday, an event that forced a change of tactics and tone from Labor in memory of its political hero.
The memories of Mr Hawke’s time in power, recounted in the outpouring of grief over his passing, gave Labor a moment to remember its record on economic reform and counter the Coalition claims that it was not fit to manage the economy.
Labor volunteers said Mr Hawke’s death had motivated them to campaign harder, although the event also prevented Mr Shorten campaigning in Brisbane electorates such as Forde on Friday, as he had intended.
Mr Shorten acknowledged that he felt a greater responsibility to win because Mr Hawke wanted him to secure the victory.
«I already feel a responsibility to millions of people to win. But sure, I want to do it for Bob, as well,» Mr Shorten said on Thursday. «I don’t want to let his memory down.»
David Crowe is Chief Political Correspondent for the Sydney Morning Herald and The Age.