Nicola Sturgeon's deputy is to face a vote of no confidence at Holyrood this week after he was accused of "blatantly" withholding the publication of damning legal advice until two days after she appeared at the Alex Salmond inquiry.
The Scottish Tories said they would press the vote after alleging John Swinney failed to hand over all the advice requested by the inquiry and made inaccurate statements about its release.
On the eve of Ms Sturgeon's appearance before the inquiry last Wednesday, Mr Swinney published what he described as "the key legal advice" and claimed "all of this material is now in the public domain."
The disclosure was made after it became clear there was a Holyrood majority for a Tory no confidence motion that would have forced his resignation. He had previously ignored two parliamentary votes for the documents to be released.
But Mr Swinney published a further tranche of documents on Friday afternoon that showed the Scottish Government lawyers fighting Mr Salmond's judicial review had challenged Ms Sturgeon whether she wanted to "plough on" regardless of their warnings he would win.
A note written on Dec 17, 2018 showed Roddy Dunlop QC and Christine O'Neill said they were "perilously close" to being unable to mount a defence and were "firmly of the view" Mr Salmond would succeed on at least one of his challenges.
Despite this, two days later the Scottish Government started an expensive 'Commission and Diligence' process in the court fight. The Sunday Mail reported yesterday that ministers spent a further £135,000 of taxpayers' money before the case was conceded in early January.
In another note published last Friday, and dated Dec 7, 2018, Mr Dunlop said there were now only two possible counter-arguments against Mr Salmond's action and "I doubt either will work."
Ms Swinney also said there were no minutes of a conference on Nov 13 that year attended by Ms Sturgeon and the two lawyers after concerns were expressed over the chances of success.
The advice buttressed claims that Ms Sturgeon had ignored her legal advice and breached the ministerial code, which is usually a resignation issue. She has denied this but the Tories are threatening to move a separate vote of no confidence in her.
Both motions would require the support of all Holyrood's opposition parties to pass. It is understood Labour will support Mr Swinney's unless "serious concerns over the withholding of some vital documents" were addressed.
Watch: What has happened so far in the Alex Salmond inquiry?
However, the Scottish Greens said they would only back it if the committee decided they had not been given all the advice it had requested. The vote is expected to take place on Tuesday or Wednesday.
Douglas Ross, the Scottish Tory leader, said Mr Swinney's position was "untenable" after he "disrespected the Scottish Parliament repeatedly, blatantly withheld evidence from a parliamentary inquiry, and tried to mislead the public."
He said: "Anyone can now see that he manipulated the flow of information to a parliament inquiry to protect the First Minister from having to respond to devastating evidence that she personally 'discounted' and disputed the advice of Queen's Counsel."
In their Dec 17 note, Mr Dunlop and Ms O'Neill said that their previous advice that the case should be conceded on a narrow, technical point "has already been said, and discounted" and the decision to proceed "had been taken by very experienced legal and political minds."
Mr Salmond was paid £512,250 of taxpayers' money to cover his legal costs after the judge Lord Pentland ruled the government's investigation into sexual misconduct complaints against him was "procedurally unfair" and "tainted with apparent bias".
The case was abandoned on the eve of a Court of Session hearing after the government admitted it had breached its own guidelines by appointing an investigating officer who had “prior involvement” with two civil servants who had made complaints.
The Holyrood inquiry into the debacle was kickstarted after when Mr Salmond was acquitted of sexual assault charges at the High Court last year.
The legal advice has disclosed a catalogue of disastrous failures by the civil service to disclose evidence requested by the court, with Mr Dunlop and Ms O'Neill expressing their "extreme professional embarrassment."
It emerged on Saturday that Scotland's chief law officer was forced to order a search of the office of Leslie Evans, Ms Sturgeon's most senior mandarin, to find relevant documents.
James Wolffe instructed a complete search of the "entire electronic repository of the permanent secretary's office" to retrieve material. However, the Scottish Government said "any accusation that she withheld information is categorically untrue."
A government spokesman said a "huge amount of documentation" had been released, including "legal advice at key stages in the judicial review process" on Tuesday.
He said further information had been disclosed on Thursday and Friday "following the completion of statutory and data protection checks" and all formal advice notes from the external counsel had now been disclosed.
An SNP spokesman said: "The Tories are showing their true colours - this is nothing but a political game to them and instead of letting due process take place, they’d rather be hysterical and opportunistic."
Watch: Do coronavirus vaccines affect fertility?