It's done.

After four days of chaos and confusion, it’s official: Scott Morrison will be Australia’s next Prime Minister.

Morrison defeated Peter Dutton and Julie Bishop in a party room ballot this afternoon, after Malcolm Turnbull stepped aside to allow someone else a run at the top job.

Turnbull failed to contest the leadership after it became clear that he had lost the support of the Liberal partyroom, telling media on Thursday that he would treat any leadership spill on Friday as a vote of no confidence in his leadership.

The final blow for Turnbull came this morning when Peter Dutton delivered a petition signed by 43 members of the Liberal Party, which called for a second leadership spill to be held.

Turnbull will now quit Parliament altogether, which will trigger a by-election in his seat of Wentworth, the result of which may undermine the government’s majority in Parliament.

Morrison defeated Peter Dutton on the second ballot, 45 votes to 40, after Julie Bishop was eliminated on the first ballot. It’s likely that Bishop will now quit politics.

The result is a stunning blow for Dutton and the far-right of the party, who orchestrated the spill, yet failed to capture the leadership. Morrison, while still a conservative, is not as far to the right as Dutton, and will be seen as a candidate who can attempt to re-unify the party.

A Dutton victory would have been seen as the far-right capturing the Liberal party.

Environment Minister Josh Frydenberg was elected Deputy Leader, defeating Greg Hunt and Steve Ciobo.

Morrison will now make the trip to Yarralumla, where he will ask the Governor General Peter Cosgrove to swear him in. However, it’s possible that Cosgrove will ask Morrison to demonstrate that he has a majority on the floor of Parliament and ca therefore form government.