THE Scottish Parliament has voted against a motion of no confidence in First Minister Nicola Sturgeon by 65 to 31.

There were 27 abstentions to the vote as well.

The motion was brought by Scottish Tory Holyrood leader Ruth Davidson MSP but was understood by all parties in the chamber to be unlikely to succeed due to the Scottish Greens saying that they would not support the motion, giving the SNP a majority.

Introducing the motion to the chamber, Davidson said that the committee investigating the Scottish Government's handling of harassment complaints found that Sturgeon had misled parliament and the "honourable" thing to do, would be to step down.

In the chamber, the Scottish Tories were criticised by Labour, the LibDems and Scottish Greens for prejudging the inquiry's findings before they had been released by announcing that they would carry on with this vote regardless of what was found.

Responding to the motion, Sturgeon said that if the independent investigation into whether she had breached the ministerial code had gone the other way, she would have resigned.

“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.”

An independent inquiry - the results of which were published yesterday - into whether the First Minister broke the ministerial code by a top Irish lawyer James Hamilton, who found she did not breach the code.

Sturgeon had referred herself to the inquiry when Salmond won his legal action against the Government over its investigation.

There were questions over when she learned of complaints against her predecessor. She told the Scottish Parliament she was informed of them on April 2 but did not tell the civil service until June.

Hamilton, Ireland’s former director of public prosecutions, concluded that this did not amount to a breach of the code.

He also considered Alex Salmond’s claim that the FM breached the code by not conceding the Government's case against him at an earlier date. He said this was not a breach either.

The Holyrood committee looking into the Scottish Government's mishandling of harassment complaints made against former First Minister Salmond officially released its findings this morning ahead of the vote.

The report said that it is "hard to believe" that Sturgeon had “no knowledge of any concerns about inappropriate behaviour on the part of Mr Salmond prior to November 2017”.

It also ruled the probe was "seriously flawed" and made a series of recommendations to help ensure the mistakes are not repeated and to bolster confidence in future complaints processes.

However, it did not find the First Minister knowingly misled parliament.

READ MORE: Holyrood harassment complaints inquiry publishes findings on Alex Salmond case

There have been criticisms of the Tories going ahead with the vote in light of the Hamilton report finding the First Minister did not breach the ministerial code and the committee's findings.

The motion was lodged before either the Hamilton report or committee findings were published, leading to accusations against the party that it was politically motivated.

Scottish Labour leader Anas Sarwar criticised the leak of information from the committee in the debate today and denounced the Scottish Tories for using the committee - and by extension, the women at the centre of it - for political gain.

Sarwar also said the Scottish Government had failed the two complainants at the heart of the inquiry but accused the Tories of “futile and vain pursuit of a cheap political scalp”.

Scottish Labour did not support the motion with Sarwar 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."

He added: “The Conservatives have shown themselves as only interested in removing Nicola Sturgeon from office, rather than the facts of this terrible series of events. They have undermined the integrity of the independent investigator.

“Yet even the most ardent SNP supporter must recognise the women who complained were let down by the Government and that half a million pounds was wasted defending the indefensible in court.”

This sentiment was echoed by LibDem leader Willie Rennie, Scottish Greens co-leader Patrick Harvie, who said the leaks meant that the committee had descended into "farce".