Nicola Sturgeon has survived a vote of no confidence brought by the Scottish Conservatives.
The motion was defeated after MSPs voted it down by 65 votes to 31.
Scottish Labour abstained, while Scottish Green MSPs sided with the First Minister.
Scottish Greens co-leader Patrick Harvie had previously confirmed his party “would not support the vote of no confidence being pushed by the Tories”.
The Scottish Conservatives tabled the motion after claiming the First Minister misled parliament and ignored legal advice.
The final report of the Committee on the Scottish Government Handling of Harassment Complaints released on Tuesday morning showed that a majority of MSPs on the committee felt Sturgeon had provided an “inaccurate account” of a meeting with her predecessor Alex Salmond.
The findings are separate from those of Irish barrister James Hamilton, who reported on Monday that there had been no breach of the ministerial code by the First Minister over her role in the long-running saga.
Speaking in the debate on the motion on Tuesday, the First Minister said had the Hamilton inquiry gone the other way, she would have quit.
“Had Mr Hamilton’s report gone the other way, I would have accepted it; had he found that I had breached the code in anything other than the most technical and immaterial of ways, I would have been standing here right now tendering my resignation,” she said.
“The integrity of the office I am so privileged to hold really does matter to me. The office of First Minister is more important than any temporary incumbent of it.”
The First Minister also told the Tories: “If you think you can bully me out of office, you are mistaken and you misjudge me.
“If you want to remove me as First Minister, do it in an election.”
Labour leader Anas Sarwar took aim at both the Scottish Government, whom he said failed the two complainants, and the Tories, whom he accused of a “futile and vain pursuit of a cheap political scalp”.
Sarwar said his party would not support the motion, adding: “We cannot support a motion which is designed, not to deliver the kind of strong opposition they promised, but purely at dividing our country and our politics still further.
“A failing government on one hand; a game-playing opposition on the other. Our politics must be better than this. Our people deserve better than this.
“For the sake of the people of Scotland, coming through Covid, and with the huge challenge and task that faces us, we can’t come back to this.
“Scotland deserves a better government and it deserves a better opposition.”
But Scottish Conservative leader Douglas Ross criticised Labour MSPs for abstaining.
He said: “Instead of doing the right (thing) today, the once-proud Labour party shamefully rolled over in front of Nicola Sturgeon.
“They are too weak to stand up to an SNP First Minister who misled the Scottish Parliament and the people of Scotland.
“It was a pathetic display and confirms to voters that Labour serves no useful purpose and cannot be trusted.
“The Scottish Conservatives are the only party in Scotland with the strength and determination to fight Sturgeon and the SNP.”
Meanwhile, addressing James Hamilton’s specific conclusion that a claim that a complainer’s name was revealed to Salmond’s former chief of staff by a member of the First Minister’s team was “credible”, Liberal Democrat leader Willie Rennie said: “James Hamilton believes that did happen; he says that version of events is credible.
“That is a terrible breach of confidentiality. Not only were they left to swim, but their identity was passed to a person that they were complaining about.
“What is now to happen to the person responsible?”
Harvie said any MSP who had leaked the findings of the committee’s report and the testimony of complainers from a private session should not be allowed to stand in May’s Holyrood elections.
He added: “They have shown contempt for the serious issue of sexual harassment. They have shown contempt for their witnesses. They have shown contempt for the rules of this Parliament.
“And, having failed in their attempt to drag Scottish politics down to their level, they should just go.”
STV News is now on WhatsApp
Get all the latest news from around the countryFollow STV News
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country