Final results are being counted in Australia where Prime Minister Scott Morrison hopes his victory in Saturday’s election will give him a majority government.
His conservative coalition has defied the polls and now needs to win three more seats to seal a shock majority.
“I have always believed in miracles,” Mr Morrison told supporters in his victory speech on Saturday night.
Exit polls had predicted a Labor Party win for the first time in six years.
But Labor leader Bill Shorten resigned in the wake of his party’s surprise defeat. “It is obvious that Labor will not be able to form the next government,” he told party members.
He will not seek re-election as his party’s leader.
The final result may not be known for some hours, but with more than 75% of votes counted the Liberal-National Coalition has won, or is ahead in, 73 seats in its quest for a 76-seat majority, with Labor trailing on 65 seats.
If the Coalition fails to win an outright majority it will need the help of independent MPs to govern.
Australia has mandatory voting and a record 16.4 million voters enrolled for the election, which returns a new House of Representatives and just over half of the seats in the Senate.
In his victory speech, Mr Morrison paid tribute to “the quiet Australians” who voted for the Coalition.
“It has been those Australians who have worked hard every day, they have their dreams, they have their aspirations, to get a job, to get an apprenticeship, to start a business, to meet someone amazing,” he said.
“To start a family, to buy a home, to work hard and provide the best you can for your kids. To save for your retirement. These are the quiet Australians who have won a great victory tonight!”
Australia election results
Seats declared so far. 76 needed to win
Why was the election important?
Australia holds elections every three years but, with infighting rife, no prime minister has succeeded in serving a full term since 2007.
Mr Morrison said he had united his government – a coalition between his Liberal Party and its traditional ally the National Party – in the nine months since he replaced Malcolm Turnbull as prime minister.
Surveys showed that the economy, cost of living, environment and health were central concerns for voters, while younger people in particular voiced frustration about climate change and a lack of affordable housing.
Mr Morrison campaigned primarily on economic issues, often doing so alone while painting the election as a choice between himself and Mr Shorten.
Mr Shorten promised to cut tax breaks for the wealthy and to lower greenhouse gas emissions.
There were fierce debates about the rolling leadership turmoil, formal recognition of indigenous Australians, and the treatment of female MPs in parliament.
“I think people have become afraid after a very negative campaign,” Labor supporter Julie Nelson told Reuters at the party’s Melbourne election night function. “They [the Liberals] managed to convince people they should be afraid of change.”