THE Scottish Government’s legal advisers had “reservations” about defending the judicial review brought by Alex Salmond, John Swinney has told MSPs.

In a letter to Holyrood’s harassment inquiry, the deputy first minister revealed that there were misgivings about fighting the case in "late October," months before it was finally conceded.

However, Swinney says that there were "good public policy arguments and reasonable grounds for the Government to continue to defend the judicial review and to seek a determination from the Court on the matters raised".

READ MORE: Swinney to release legal advice on Salmond case amid fear of losing confidence vote

In January 2019, the Scottish Government admitted that they had botched the probe by appointing senior civil servant Judith MacKinnon as the investigating officer to look into allegations of harassment against Salmond. 

However, she had previously had substantial contact with the two accusers.

Paragraph ten of the Scottish Government’s complaints handling procedure says the investigating officer “will have had no prior involvement with any aspect of the matter being raised”.

The Court of Session ruled that the process was unlawful, unfair and tainted by apparent bias.

MSPs have voted twice for the government's legal advice to be released to a Holyrood committee - a move supported by Salmond when he appeared before it last Friday.

Ministers agreed to release legal advice last night, but only after Swinney looked set to lose a vote of no confidence in Holyrood.

In a letter to the inquiry this morning, the deputy first minister said the advice would be published this afternoon.

He wrote: "As the Committee is aware, there is no existing precedent for the Scottish Government to waive legal privilege in the circumstances of litigation and I have been concerned about the potential risk of creating a new precedent that would impact on the ability of future administrations to receive candid and confidential legal advice.

“However, over recent days there has been public debate about the ability of the Parliament to hold the Government to account. 

“Accusations have also been raised with the Committee, without evidence, about the reasons why the Government continued to defend the judicial review until it was conceded on a single ground in January 2019.

“I am concerned that this debate and the accusations, if not responded to, could impact negatively on public confidence in the Parliament, Government and even our justice institutions. 

“I have determined therefore, consistent with the terms of section 2.40 of the Scottish Ministerial Code, that, in these exceptional circumstances, the balance of public interest now lies in releasing to the Committee and for publication the contents of legal advice received by the Government during the judicial review, in particular the contents of advice from external Counsel. 

“The Law Officers have provided their consent that there are compelling reasons for disclosure in these specific circumstances.

“The documents confirm that, whilst reservations were raised about the judicial review following the identification of the issue of prior contact with the complainers in late October, there were good public policy arguments and reasonable grounds for the Government to continue to defend the judicial review and to seek a determination from the Court on the matters raised, until the events of late December 2018.

“Subject to completing the necessary legal notifications, in line with our statutory obligations, we aim to release the material to the Committee on Tuesday afternoon.”

Scottish Tory leader Douglas Ross said: "The legal advice that John Swinney claimed would exonerate the government actually confirms what everyone suspected.

"The government knew of the fatal flaw in their case months before conceding but went on to waste £500,000 of taxpayers' money anyway.

"Recklessly continuing with the judicial review when it was doomed would clearly be a breach of the Ministerial Code. The public deserve to know exactly what mistakes were made.

"John Swinney is not getting away with releasing only the evidence he wants us to see. We will press ahead with the Vote of No Confidence until all the legal advice is published.

"I'd like to thank other opposition parties for supporting Scottish Conservative moves to have the legal advice released for a third time. The government must be held to account and by uniting behind our motion, we will ensure the will of the Scottish Parliament is respected."

In written evidence to MSPs, published last Monday, Salmond said: "Further once the Judicial Review had commenced, and at the very latest by October 31st 2018 the Government and the First Minister knew of legal advice from external counsel (the First Minister consulted with counsel on 13th November) that on the balance of probability they would lose the Judicial Review and be found to have acted unlawfully.

"Despite this the legal action was continued until early January 2019 and was only conceded after both Government external counsel threatened to resign from the case which they considered to be unstateable. This, on any reading, is contrary to section 2.30 of the Ministerial Code."

Taking questions at the committee on Friday, Salmond said rules were in place to allow legal advice given to the government to be released if it was "in the public interest" and pointed to previous circumstances when advice was published.

He said: "There is an understandable reason for reluctance to reveal legal advice, as a general rule, but the rules, as drawn up, provide for exceptions in the public interest.

"There have been a number of precedents in the past - I am thinking of the blood contamination inquiry, for example.

"Although every instance is going to be different, I think that most people, judging the current issue, would say that, after two parliamentary votes, that legal advice should and must be furnished.

"It might be that something should be written into either the ministerial code or the standing orders of the Parliament to make that clear. I am just amazed that you would have to go that far to ensure that that is done. The normal assumption would be that ministers would follow a clearly expressed will of the Parliament when they are able to do so."