Tory MPs have passed a confidence motion in the government just two weeks after dumping Boris Johnson.
MPs have supported the motion by 349 votes to 238, a majority of 111.
A defeat in the vote on Monday evening would likely have triggered a general election.
But despite the party moving to oust their leader, Conservative MPs decided not to rebel and instead opted to swing behind the administration.
Bizarrely, the motion was tabled by the government itself.
Labour’s attempt at calling a confidence motion had been blocked by ministers last week, with the government arguing it was incorrectly worded.
Johnson will leave office on September 6.
For his part, Starmer accused Johnson of being a “vengeful squatter mired in scandal”.