Scott Morrison has won the Liberal leadership spill, paving the way to become Australia’s 30th prime minister.

The Treasurer edged out Peter Dutton, 45 to 40 in a partyroom meeting in Canberra on Friday afternoon.

There were three contenders with Julie Bishop the first to be eliminated.

Josh Frydenberg has been appointed as deputy leader, beating Steve Ciobo and Greg Hunt. Party whip, Nola Marino confirmed Frydenberg won in “in an overwhelming sense”.

The spill motion was carried 45 votes to 40, meaning almost half the partyroom wanted Mr Turnbull to stay in power.

Scott Morrison has won the Liberal leadership spill, paving the way to become Australia’s new prime minister. More

The meeting had been expected to start at midday but was delayed while the 43 signatures on a petition calling for the meeting were verified.

Mr Turnbull is now the 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.

Turnbull narrowly defeated a leadership challenge from Peter Dutton on Tuesday, but his leadership has since unravelled, with Mathias Cormann heading a string of prominent cabinet figures to resign.

Mr Turnbull’s planned resignation will now force a by-election in his Sydney seat of Wentworth that could threaten the coalition’s one-seat majority in the lower house.