Scott Morrison was voted leader of the Liberal Party and is to become new prime minister of Australia after the party forced out Malcolm Turnbull on Friday.
Morrison, who has been Australia's treasurer, replaced Turnbull amid growing discontent and a revolt of party conservatives against the now-former party leader.
Morrison defeated former home affairs minister Peter Dutton with 45 votes to 40, Chief Government Whip Nola Marino told the media.
Foreign Minister Julie Bishop was eliminated in the first round of voting.
Josh Frydenburg, who until now has been minister for the environment and energy, was elected new deputy leader, Marino said.
In his last statements to the press alongside his family, Turnbull announced Friday that he will leave office "not before too long" and used the opportunity to denounce the "insurgents" who toppled him from power.
"In the party room meeting today, I was impressed by how many of my colleagues spoke or voted for loyalty above disloyalty, how the insurgents were not rewarded by electing Mr Dutton for example, but instead my successor, to whom I wish the very best, Scott Morrison - a very loyal and effective treasurer," said Turnbull.
"Australians will be just dumbstruck and so appalled by the conduct over the last week," Turnbull added.
Friday's drama began when a party meeting was convened after Turnbull received a petition letter with signatures of the majority of Liberal MPs. He had said Thursday that if a leadership vote was called after receiving the petition, he would not stand as a candidate on the ballot.
Dutton, who on Tuesday lost to Turnbull by 35 to 48 votes in an earlier leadership ballot, had insisted on holding a second, believing he had the necessary votes to take over the party and government.
"My course from here is to provide absolute loyalty to Scott Morrison," said Dutton, leader of the revolt against Turnbull, while leaving the meeting that lasted about 30 minutes on Friday.
Since the Liberal leadership crisis unfolded on Tuesday, about 13 legislators have resigned from ministerial positions, including Finance Minister Mathias Cormann, Turnbull's strongest ally.
This is the second time the Liberal Party, part of the ruling Liberal-National coalition of the Australian government which won the 2013 and 2016 elections, has changed its leadership after Turnbull took power in 2015 through another internal spill, rolling Tony Abbott.
Australia is scheduled to hold a general election in 2019, although some experts have predicted that it might be brought forward.
Internal power struggles and leadership changes have become frequent in Australia in the past decade, both during the governments of the Liberal-National coalition and the Labor Party.