The Scottish government has agreed to release key legal advice from its court battle with Alex Salmond after MSPs threatened a vote of no confidence.
Holyrood has twice voted to urge ministers to publish advice they were given after the former first minister took the government to court.
Deputy First Minister John Swinney previously argued that such legal advice should remain confidential.
But on Monday he confirmed that the advice would be released to MSPs.
The move came after all opposition parties indicated they would back a motion of no confidence in Mr Swinney if he did not comply, with the SNP government facing defeat.
The Scottish Conservatives had lodged a one-line motion and were pushing for debate on Tuesday – but said they would withdraw it if the advice was released.
Mr Swinney said he would be handing the papers over to an inquiry committee “to counter the false claims being made by some” about what advice the government had been given and when.
The row centres on legal advice that was given to the Scottish government after Mr Salmond launched judicial review proceedings in 2018 over the way harassment complaints against him had been handled.
The government ended up admitting it had acted unlawfully because its investigating officer had had prior contact with the two complainers, and had to pay the former first minister more than £500,000 in legal expenses as a result.
The Holyrood inquiry investigating the botched probe has been keen to examine exactly what advice the government was given during the row, with Mr Salmond claiming that officials were told by lawyers that it was unlikely to win the case months before actually conceding defeat.
The former SNP leader said he had “absolute reason to believe” that counsel had informed the government on 31 October 2018 that they were facing defeat – only for the case to continue into January 2019.
Mr Swinney appeared to push back on this while confirming the advice would be published, saying: “Serious allegations have been made – this material allows people to confirm that these allegations are false.”
The SNP does not have a majority at Holyrood, and what became clear today was they would lose a vote of no confidence.
With that threat hanging over the deputy first minister, the government blinked and decided to take the highly unusual step of releasing the legal advice.
This has never happened before. The Scottish government has never handed legal advice over to a parliamentary committee with the expectation it will be published.
They’re doing that because of political pressure – although they also say they are concerned that Alex Salmond’s claims have threatened the integrity of the justice system.
This is happening the day before the Lord Advocate is due to give evidence, and two days before Nicola Sturgeon is due to appear in person. This is a massive week for this inquiry.
MSPs twice voted to demand the inquiry was given access to all legal advice from the civil case.
The committee was given sight of a memo summarising key advice from the row, but continued to call for more detail – particularly after Mr Salmond’s evidence session on Friday.
On Sunday, the Conservatives said they were giving Mr Swinney 24 hours to hand over the advice or face a motion of no confidence.
And on Monday they published a motion stating that “the parliament has no confidence in the deputy first minister, in light of the government’s continued failure to publish legal advice called for in two resolutions of the parliament”.
All opposition parties backed the move, meaning the minority SNP government could have been heading for defeat – with Tory leader Douglas Ross saying the deputy first minister was “out of options – release the legal advice or lose his job”.
Mr Swinney confirmed on Monday evening that “the key legal advice that underpinned the Scottish government’s defence of the judicial review” would be released on Tuesday.
He said: “In normal circumstances, government legal advice is not released. Indeed, such is the importance of being able to get frank, private advice, it is almost unheard of for the legal advice to be released.
“But we have to acknowledge that the issues at stake now are not normal. The very integrity of the legal system is being questioned.
“Serious allegations have been made. This material allows people to confirm that these allegations are false.”
The inquiry committee is to take evidence from Lord Advocate James Wolffe – the government’s top legal advisor – on Tuesday.
Nicola Sturgeon will then follow on Wednesday, with the first minister saying she is looking forward to putting her side across.