The fight for the future of Australia’s Labor party has begun after it lost what was considered up until the final days of the campaign to be an unloseable election, in a result that Labor MPs said was “devastating”.

While counting was still ongoing, the Liberal National Coalition was predicted to win 76 seats in the 151-seat House of Representatives. The Australian Labor party (ALP) was predicted to win 69.

If a party or coalition wins 77 seats in the House of Representatives, it can govern in its own right without the need to rely on independents for support.

It was a bruising and unexpected result for the ALP, which had been ahead in every opinion poll since mid-2016, and has been likened to the votes that led to Donald Trump being elected and Brexit winning approval in the UK.

The shock outcome prompted the Labor leader, Bill Shorten, to step down late on Saturday night. When asked what went wrong for the party, which campaigned on ending tax breaks for the wealthy and tackling the climate emergency, Shorten said: “We didn’t get enough votes.”

On Sunday, party insiders were asking whether they had picked the wrong man to lead them into the election – Shorten has consistently struggled with low personal approval ratings – and whether Labor’s policy mix was too radical.

Shorten’s opponent Scott Morrison – a former treasurer and head of Tourism Australia whose affable, guy-next-door appeal grew during the campaign – had painted the election as a simple choice between the two men.

While the Labor leader tried and failed to sell “big target” policies on health, wages and the climate crisis, Morrison, whose party has long resisted plans to sharply cut carbon emissions, promised very little beyond the fact he was not and never would be Shorten. The strategy paid off.

On Sunday, Shorten said he would remain in parliament and stay on as interim Labor leader while the party decided who would succeed him. He said in a brief appearance in front of the media: “Today is a very hard day.” The ALP national executive was due to meet on Monday to begin making arrangements for the ballot and the post-election postmortem. The process could take up to five weeks.

The leftwinger Anthony Albanese immediately announced he would contest the leadership but other high-profile figures are expected to throw their hats into the ring. Among them are the shadow treasurer, Chris Bowen, from the party’s right faction and the deputy leader, Tanya Plibersek, another leftwinger.

While telling reporters on Sunday he had no criticism of Shorten as Labor leader, Albanese was candid about the weekend rout, noting Saturday night was a “devastating result for the Australian Labor party”.

In an implicit criticism of Shorten’s campaign agenda, Albanese said Labor needed to articulate an agenda for economic growth, not just talk about how it was prepared to redistribute wealth. He said Labor needed to acknowledge it had lost three elections in a row and its supporters needed to be reassured that Saturday’s result would not be repeated at the next federal election.

Albanese said the task was to respect the election outcome, “go back, talk to people and do better, because our people need us to be in government. I think Australia needs a Labor government.”

Morrison, who took over as prime minister in 2018 from the more moderate Malcolm Turnbull, described his unexpected win as a “miracle” comeback.

The Coalition defied expectations by holding on to several seats in the outer suburbs of Australia’s largest cities, as well as in the resource-rich states of Queensland and Western Australia and the small island state of Tasmania.

In his victory speech, Morrison paid tribute to “the quiet Australians” who voted for his party. “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.”

Repeating a mantra that has been mocked by the media during the campaign but seemed to gain traction with voters, Morrison said Australians were “looking for a fair go and they’re having a go and they’re going to get a go from our government”.

Trump and the Israeli prime minister, Benjamin Netanyahu, were among the first world leaders to congratulate him. “Congratulations to Scott on a GREAT WIN,” Trump said on Twitter.

Morrison, who is known for his “daggy dad” persona and a tendency to overuse Australianisms such as “fair dinkum”, spent Sunday at his pentecostal church Horizon in Sydney’s southern suburbs before appearing in the stands to watch his team, the Cronulla Sharks, in a rugby league match. Unlike him, they lost.