Center-right legislator Scott Morrison was elected Australian prime minister Friday to replace incumbent leader Malcolm Turnbull after four days of chaotic scenes that raised questions over the country’s political stability.

Morrison, the incumbent Treasurer, beat conservative rival Peter Dutton 45-40 in a ballot by the ruling Liberal Party, with a third contender, Julie Bishop, dropping out in a preliminary round of voting. Turnbull did not stand for re-election and said afterwards he would be resigning from his parliamentary seat.

“Australians will be just … dumbstruck and so appalled by the conduct of the last week,” Turnbull said with considerable understatement on events that paralyzed the government during a polarizing factional power struggle.

The political crisis began on Tuesday when Turnbull called a leadership vote at a regular Liberal Party meeting in an effort to scuttle an obstructive campaign by conservatives that had already destroyed a key energy policy.

Turnbull scraped through 48-35 when challenged by Dutton, but it was apparent he had been fatally wounded. Within hours 10 of Turnbull’s Cabinet colleagues had quit and moderate backbenchers began to desert him.

As backroom bartering intensified, the situation descended into farce, with the government effectively frozen. Question time had to be scrapped in the lower House of Representatives on Thursday because there were too few Cabinet ministers left, and the chamber was subsequently shut down.

FILE PHOTO: Australian Prime Minister Malcolm Turnbull speaks to the media during a news conference at Parliament House in Canberra, Australia, March 27, 2018. AAP Image/Lukas Coch/via REUTERS ATTENTION EDITORS - THIS IMAGE WAS PROVIDED BY A THIRD PARTY. NO RESALES. NO ARCHIVE. AUSTRALIA OUT. NEW ZEALAND OUT
Ousted Australian premier Malcolm Turnbull at Parliament House in Canberra, Australia, March 27, 2018. Photo: AAP Image via Reuters/Lukas Coch

With pressure mounting on the government from all sides to resolve the standoff, Turnbull called a second party meeting Friday and stepped aside. Morrison and Bishop, who are both from Turnbull’s moderate wing of the party, stood against Dutton in a bid to nullify his conservative alliance.

Sydney-born Morrison, 50, who was treasurer in Turnbull’s government, will try to bring the two warring factions together, but may find himself overseeing a breakup of the party. While Dutton has promised to work with the moderates, some analysts believe the divisions are too great.

“The government’s problem is not so much that it has produced yet another of Australia’s famous leadership crises. It is that it has looked like a government in an advanced state of political decay, and one that has largely forfeited its right to be taken seriously,” the Conversation opinion newspaper noted.

Morrison, himself a polarizing figure, was voted the least-popular choice for prime minister from Liberal leaders in a poll on Wednesday. He took just 8.6% of the votes, behind Turnbull (38%), Bishop (29%) and Dutton (10%).

A hardliner on social issues, Morrison was criticized by the United Nations in 2014 for insisting that the children of asylum seekers be detained while their residency claims were processed. An Australian human rights report found the minister had not acted in the best interests of these children.

(FILES) This file photo taken on August 22, 2018 shows Australia's Treasurer Scott Morrison attending a press conference in Parliament House in Canberra.Treasurer Scott Morrison was on August 24, 2018 picked as Australia's new prime minister after a Liberal party coup in a stunning upset against key challenger Peter Dutton, broadcasters ABC and Sky News reported. / AFP PHOTO / MARK GRAHAM
Australia’s then Treasurer, now Prime Minister Scott Morrison at a press conference in Parliament House in Canberra. Photo” AFP/Mark Graham

Last year the deeply Christian Morrison attracted more controversy for opposing a bill legalizing same-sex marriage, even though it had strong support from his party. He also supports Australia’s reliance on fossil fuels, and has been ambiguous on his stance toward climate change measures.

It is expected that he will adopt progressive economic policies, including a further reform of the tax framework, but will seek to pacify conservatives by backing an immigration cutback and possibly reducing commitments to climate change policies. But it may not be enough to save his government, though.

Turnbull’s departure will rub out the Liberal-National coalition’s one-seat majority in parliament, at least until a by-election can be held, forcing Morrison to rely on independents. One Nationals legislator has already said he will sit on the cross-benches, and possibly support the opposition.

The next general election is not due until next year and Morrison will want to rebuild the Liberals’ tattered support base first; but he may not get the chance, as opinion polls indicate most voters believe he should seek a new mandate.

“A change of government federally, at an election sooner rather than later, is likely. This will be a good thing for politics across the board, because the Liberal Party needs time for reflection and regeneration,” said Chris Wallace, a research fellow at the Australian National University.

“Good policy and good government in Australia should not have to wait while they sort themselves out.”