SNP defeats Labour’s motion of no confidence in Holyrood | Scottish National party (SNP)

The SNP government has defeated Labour’s attempt to force an early Holyrood election, as the Scottish Greens warned the party it must “remain progressive” as an imminent leadership contest threatens to reopen bitter divisions.

Anas Sarwar’s motion of no confidence in Humza Yousaf’s administration – which would have forced all government ministers to resign – was defeated by 70 votes to 58 on Wednesday afternoon after the Greens voted with the SNP.

Last week the Scottish Greens said they would support another confidence motion in Yousaf himself, proposed by the Scottish Conservatives, in a backlash to Yousaf’s decision to unilaterally axe their governing partnership.

With the SNP two short of a Holyrood majority, this left Yousaf unable to secure enough votes to win and on Monday he announced his intention to step down as first minister once a new party leader has been elected.

Wednesday’s result, which was met with relieved applause from the SNP benches, came after Sarwar argued it was “untenable” for the SNP to “impose yet another unelected first minister” on the country after the two previous leaders had departed “in controversy and chaos”.

Douglas Ross, leader of the Scottish Conservatives, said his party had succeeded in forcing Yousaf out of government and later mocked reports that two potential contenders for the SNP leadership, John Swinney and Kate Forbes, were negotiating a deal as “a shady stitch-up to avoid another brutal and bloody leadership contest”.

In his first remarks to the Holyrood chamber since Monday, Yousaf told MSPs that he was “exceptionally proud” of his government’s record.

He said: “We choose progressive taxation, we choose to launch a 10-year just transition fund to support Scotland’s drive to net zero – where of course, Labour choose to ditch their £28bn green energy pledge.

“Where Keir Starmer refused for months to call for an immediate ceasefire, even failing to condemn the collective punishment of the people of Gaza, I and the government I lead chose to be a voice of peace and humanity in the world.”

Scottish Greens co-leader, Patrick Harvie, praised Yousaf for his “immense dignity” when his in-laws were trapped in Gaza during Israeli bombardment last October.

He said: “When global political events were impacting directly on his own family, Humza Yousaf rightly gained huge respect for speaking out for and in many cases humanising the people of Gaza, humanising the victims of collective punishment in a way that no other national leader I can think of was able to do.”

But in a warning to the next SNP leader, he added: “A minority government must reach out and bring together a majority in parliament and for that to happen it will need to remain a progressive government.”

Earlier in the day, in his first interview since his resignation, Yousaf told BBC Scotland he had “paid the price” for mishandling the ending of the Bute House agreement, but still believed that its conclusion was “the right thing to do for the party and the country”.

He conceded that Harvie’s refusal to accept the Cass review as a valid scientific document had “upset a lot of people” in the SNP but said it was “not necessarily” a factor in ending the partnership.