CANBERRA, Australia - In Australia, the Liberal-National Party Coalition has been re-elected in a shock result in which Labor lost seats in Queensland, Tasmania and NSW and failed to make more than minimal gains nationally.
But former prime minister Tony Abbott has been routed in Warringah, defeated by high profile independent Zali Steggall, after a bitter contest. "This is a win for moderates with a heart," Steggall told jubilant supporters.
It is not entirely clear whether the Coalition will be in minority or majority government.
Scott Morrison told a cheering crowd, "I have always believed in miracles".
"How good is Australia and how good are Australians." He said the "quiet Australians" had "won a great victory tonight", and repeated his pledge to "burn" for all Australians "every single day".
The defeat is shattering for Labor, which ran a high-risk campaign that included tax hikes to pay for big spending programs.
After ringing Morrison to concede defeat, Bill Shorten announced he will not recontest the leadership, although he intends to remain in parliament. Anthony Albanese, from the left, will run for the leadership. Many in Labor thought Albanese would have been a better bet as leader than Shorten, who always had bad personal ratings.
A deeply disappointed Shorten said in a gracious speech: "I wish we could have done it for Bob", a reference to Bob Hawke, who died on Thursday.
"I'm proud we argued for what was right, not what was easy," he said. He urged supporters to "carry on the fight", adding "our time will come".
Shorten said the Coalition's preference arrangements with One Nation and Clive Palmer had hurt the ALP vote "in a lot of places where it mattered most, particularly in Queensland and NSW".
In the early hours of Sunday, with more than 70% of the vote counted, the ABC had the Coalition on 74 seats – 77 is needed for a majority after providing a speaker.
The outcome is completely opposite to the polls, which all had Labor ahead going into the election, albeit narrowly and with some tightening during the campaign.
Nationally, the Coalition's primary vote was 41.6%, while Labor was polling 33.4%.
ABC electoral analyst Antony Green said on a two-party basis there was 1.5% swing to the Coalition across the country.
On Saturday night's figures, the government was gaining two seats in Tasmania (Bass and Braddon), two in Queensland (Herbert and Longman), and Lindsay in NSW. Labor has gained Gilmore in NSW, and has prospects in some other seats, but its seat of Macquarie (NSW) is in danger.
While Labor appears to have won Dunkley and Corangamite in Victoria, both were notionally ALP after the redistribution. The Liberal seat of Chisholm is knife edge. Labor had hoped for more wins in Victoria.
In Western Australia, Labor failed to make hoped-for gains.
In Wentworth, independent incumbent Kerryn Phelps is neck and neck with Liberal candidate Dave Sharma.
In Indi, vacated by independent Cathy McGowan, independent Helen Haines has pulled ahead of the Liberals' Steve Martin.
Morrison ran a much stronger campaign than many had expected – even so, the Coalition had been bracing itself for defeat. Labor had thought it would get over the line right to the end, although ALP sources had become increasingly nervous in the last days of the contest, as the Coalition scare campaign over the ALP's policies to clamp down on negative gearing and franking credit cash refunds increasingly had its effect.
Abbott's defeat in Warringah came after a ferocious local backlash against him, and he was heavily targeted by Getup in a campaign in which climate change was central.
Abbott, who has held the seat since 1994, told his campaign workers the Coalition's national performance was "a stupendous result […] Scott Morrison will now, quite rightly, enter the Liberal pantheon forever."
He said that once Phelps won the Wentworth byelection "I always knew it was going to be tough here in Warringah. […] But I decided back then, in October of last year, that if I had to lose, so be it. I'd rather be a loser than a quitter".
On the climate issue, he said "where climate change is a moral issue, we Liberals do it tough. But where climate change is an economic issue […] tonight shows we do very, very well."
Steggall said: "Tonight Warringah has definitely voted for the future. And you all showed that when communities want change, they make it happen".
"I will keep the new government to account, and make sure we take action on climate change".
Former Liberal deputy leader Julie Bishop, appearing on the Nine network, said: "You have to be aligned to the thoughts and aspirations, and hopes and dreams of your electorate in major issues and [on] two of them, same-sex marriage and climate change, Tony was not on the same page."
The Nationals held all their seats. Nationals federal president Larry Anthony said it had been "an amazing result for the party".
"The silent majority have voted. They've voted with their feet right across Australia and particularly in our rural seats," Anthony said.
Former prime minister John Howard said: "Tonight is a celebration for the Liberal party".
Home Affairs Minister Peter Dutton, who retained his marginal Queensland seat of Dickson, said he wanted to quote the words of Paul Keating, "this is the sweetest victory of all."
(The writer Michelle Grattan is Professorial Fellow, University of Canberra).
(Photo credit: ABC.net.au).