Australia government lawmakers on Friday elected Treasurer Scott Morrison as the next prime minister in a ballot that continues an era of extraordinary political instability.
Morrison defeated the key challenger Peter Dutton, a former Cabinet minister, by a vote 45-40.
Dutton's supporters had forced incumbent Prime Minister Malcolm Turnbull to hold the leadership ballot. Turnbull did not contest the ballot and later confirmed his intention to quit politics.
"I'll be leaving the Parliament ... not before too long," he told reporters.
His resignation would cause a by-election that could cost the government its single-seat majority. It could also encourage Morrison to soon call general elections.
Dutton's failure prevents the Australian policy shifting to the hard right, although there has been little policy discussion in the leadership crisis.
Turnbull condemned Dutton supporters for bringing down his leadership in an intense and bruising campaign, which the prime minister described as "an insurgency," which went public on Tuesday.
"Many Australians will be shaking their head in disbelief at what's been done," Turnbull said.
Foreign Minister Julie Bishop had been among the favorites and could have become Australia's second female prime minister. She was rejected on the first round of voting.
A beleaguered Turnbull demanded the names of lawmakers in the conservative Liberal Party who wanted him to go before he would allow them to choose a new prime minister at a meeting at Parliament House on Friday. The names would prove a majority of his government had abandoned him.
The bare minimum majority of 43 signatures were provided shortly before the meeting started. They included more than one Turnbull supporter who signed to break the impasse.
Turnbull has become the fourth prime minister to be dumped by his or her own party before serving a full three-year term since the revolving door to the prime minister's office started in 2010. The trend is universally hated among Australians, who expect they will get to judge their leaders at the ballot box.
Dutton's and Turnbull's camps waged the most chaotic, frenetic and at times farcical leadership struggle that Australian politics has seen in years, closing down Parliament on Thursday and damaging the Liberal Party's credibility.
Public anger became apparent overnight with windows broken at the Brisbane office of Dutton, Turnbull's main rival in his government.
But the extend of disquiet about Turnbull's leadership proved to be exaggerated by many Dutton supporter. Of the 85 lawmakers at Friday's meeting, 40 opted for no change.