The SNP has defeated a Labour bid to force Humza Yousaf and his ministers to resign.

Anas Sarwar's motion of no confidence in the Scottish Government was defeated by 70 votes to 58.

Labour, the Tories, the Lib Dems and Alba all voted to bring down the government.

READ MORE: Harvie comments on Cass review 'upset' SNP MSPs admits Yousaf

Had it been successful it would have forced the outgoing First Minister and all of his ministers to resign. 

However, as Mr Yousaf announced his intention to resign on Monday, the Scottish Green MSPs moved to back the government.

Opening the debate, Mr Sarwar said the SNP as a political party was "so chaotic, divided and dysfunctional, that it can’t deliver competent government and is failing Scots every day."

"I don't believe changing the face at the top is going to change that," he added. 

The Scottish Labour said the new leader should mean a Holyrood election. 

He pointed to a similar argument made by Nicola Sturgeon when Rishi Sunak replaced Liz Truss as Prime Minister. 

"She said we couldn’t have a revolving door at Downing Street, that the office of Prime Minister was not the play thing of one political party and that it would be a democratic outrage if it didn’t go to an election and for the people to decide.

"If that’s the principle that the SNP rightly applied to Westminster and the UK, why do they now hold Scotland to a lower standard?"

Scottish Tory leader Douglas Ross supported the motion though hit out at Scottish Labour for failing to secure a majority. 

He too spoke about the leadership contest, saying it looked as if "Nicola Sturgeon’s health secretary will either be replaced by Nicola Sturgeon’s deputy or Nicola Sturgeon’s finance secretary".

"What a damning verdict on the current cabinet," he added.

"Each of the individuals sitting on the front bench today, hand-picked by Humza Yousaf to run the departments of this government, have ruled themselves out.

"Never mind the opposition having no confidence in this government, it seems none of the ministers have confidence in themselves either."

Mr Ross was forced to apologise to John Swinney after he referred to the former deputy first minister as “not so honest John” in the Holyrood Chamber.

He was first reprimanded by the Presiding Officer for referring to Mr Swinney as “honest John” and replied: “Oh sorry, I thought it was on accuracy because it would be not so honest John with some of the things we’ve heard recently.”

Apologising, Mr Ross said: “I will apologise. I’m very sorry for any hurt caused.”

READ MORE: SNP leadership contest: Swinney and Forbes hold 'secret talks'

Mr Yousaf said he was proud of his party's record in Government.

He told MSPs that despite saying his door was always open he had not “heard a single positive idea” from Labour.

He added: “What I have heard is the deafening sound of principle after principle being thrown out of Anas Sarwar’s window. U-turning on the two child cap, U-turning on the devolution of employment law, U-turning on the devolution of drug law, U-turning on his support for Waspi women.

“The true vote of no confidence that the people of Scotland really need, and they deserve, is a vote of no confidence in this failing, miserable union that is holding Scotland back and inflicting damage on the people and the economy of this country.”

Scottish Green co-leader Patrick Harvie said the "true motive" of the motion was "chaos for the sake of chaos.”

He added: “Let’s just consider what would happen if it passed; a month to seek another government, then an election around the time that voters around the country were heading off on their summer holidays, a new government formed perhaps by August – leaving just a little more than a year-and-a-half until the legally required dissolution for the 2026 election.”