Scott Morrison's promise of tax cuts and a tough line on immigration has helped him in the election.

The center-right government of Australian Prime Minister Scott Morrison held on to power Saturday after a surprise surge in national elections that left some pundits making comparisons to President Donald Trump's poll-defying win in 2016.

The apparent upset victory was the latest election to trample predictions by polling firms, which all showed Morrison's political bloc trailing the opposition Labor Party.

It also carried other uncanny parallels with Trump's rise.

Morrison drew further support with promises of tax cuts and a tough line on immigration, contrasting with Labor's call for more social programs and less-stringent migrant policies.

The Labor leader, Bill Shorten, conceded defeat as election returns tipped the scales against him.

Morrison's Liberal-National coalition was two seats short of a parliamentary majority after about 70% of the vote had been counted, according to election officials. But political analysts said the pattern of voting made it likely that the coalition would emerge Sunday with more than half the seats in parliament.

Confidence was so high in a Labor victory that one betting agency, Sportsbet, said about 70% of the wagers were for Labor to regain control after six years in opposition.

"This is a complete shock," said Zareh Ghazarian, a political science lecturer at Monash University in Melbourne. "We have completely expected an opposite thing for two years. Voters rejected the big picture. They have endorsed a government that has run on a very presidential campaign and on its management of the economy."

The reelection of Morrison's government will mean that Australia will set much less ambitious goals in cutting emissions of greenhouse gases. It will also be firmly supportive of U.S.-led efforts to contain the influence of China and block Chinese technology giant Huawei from government contracts.

Morrison was one of the architects of Australia's tough approach on asylum seekers, which has confined thousands to Pacific Island camps, and is expected to continue with the approach that has been condemned by human rights groups around the world.

In the end, Morrison's regular-guy political persona - he was the first Australian prime minister to campaign in baseball caps - and promises to cut taxes proved unexpectedly effective.

Not long after Shorten's concession speech, Morrison appeared on a stage in Sydney with his grade-school-age daughters, Lily and Abbey, and wife Jenny.

An evangelical Christian, Morrison said: "I have always believed in miracles. I am standing with the three biggest miracles in my life, and tonight we have been delivered another one."

Morrison thanked the "quiet Australians" for the victory. In the past, Morrison had expressed admiration for Trump and his ability to tap into resentment over globalized trade.

Morrison's government has placed restrictions on some Chinese investments and effectively banned Huawei from Australia's 5G telecommunications network.

But Labor leader Shorten has suggested Australia needs to recalibrate its relationship with China, saying Australia must take a more rounded approach in its dealings with Beijing and not only view it "through the prism of strategic risk."

Shorten's promises of a wider social safety net, support for renewable energy and government stability - after six prime ministers in eight years - have resonated strongly across the country.

Shorten's wooden speaking style was a liability, but he managed to successfully unify a party traumatized by conflict in its senior ranks during the last Labor government, from 2007 to 2013, when Prime Minister Kevin Rudd was removed and reappointed three years later.

Shorten proposed that Australia generate half of its electricity from solar, wind and other renewable sources by 2030, a huge shift for a nation with the world's fourth-largest coal reserves and the eighth-biggest natural gas industry.

The policy backfired against him in Queensland state, the center of the country's coal industry, where voters swung to the government in large numbers. Gains in Shorten's home state of Victoria weren't enough to cover losses elsewhere.

The death two days before election day of one of Australia's transformative political figures, former prime minister Bob Hawke, had been expected to deliver a modest sympathy vote to the Labor Party, which he led in the 1980s.

His wife, Blanche d'Alpuget, announced the death Thursday of the 89-year-old, but did not give a cause. In Hawke's last public statement, he issued an open letter urging voters to support Shorten.

Hawke, who served as prime minister from 1983 to 1991, was widely regarded as the most successful Labor politician in Australian history and was known for integrating the country into the global economy, forging alliances with Asian nations and strengthening ties with world powers such as the United States.

Shorten conceded defeat at a Labor campaign rally in Melbourne. With wife Chloe by his side, the 52-year-old former union head said he would resign as Labor leader but remain a member of Parliament.

"I know you are all hurting," he said. "I am too. I wish we could have won for our true believers. I wish we could have done it for Bob."