NICOLA Sturgeon has said the Scottish Government may not publish the legal advice behind its courtroom battle with Alex Salmond despite an order from Holyrood.

The First Minister said the Scottish Ministerial Code, which she is accused of breaking in a related context, could prevent the advice being disclosed.

She told FMQs release was not a decision for ministers alone, as the prior consent of the Government’s law officers was needed to waive legal privilege for “compelling reasons”. 

Publication without that consent would be “blatantly breaching” the code, she said.

MSPs voted 63-54 last night to demand that the Government release its legal advice on the doomed civil case, which left taxpayers with a bill for at least £630,000.

Parliament wants the material released to the cross-party inquiry which is looking into how a botched Government sexual misconduct probe led to the costly defeat.

Mr Salmond has the probe, which was into sexual misconduct claims made against him in 2018, set aside through a judicial review at the Court of Session.

He was able to show it had been unlawful, unfair and “tainted by apparent bias”.

The Government’s mistake - to appoint an investigating officer who was in prior contact with his accusers - left taxpayers with a £512,000 bill for his costs.

The Government also spent more than £118,000 for external legal advice for the case.

After the Government’s case collapsed in January 2019, Ms Sturgeon gave an undertaking to parliament to “provide whatever material” the inquiry requested.

She said: “That is the definition of full, thorough and open inquiries. My commitment is that the Government and I will cooperate fully with it.”

But her officials and ministers have since tried to block witnesses and withhold evidence.

In particular, the Government has refused the committee’s request for the legal advice on which it decided to defend the civil action for  the best part of a year. 

Ministers have cited “legal privilege” for doing so, despite waiving it for three judge-led inquiries on contaminated blood, historical abuse and Edinburgh’s trams. 

On Wednesday, MSPs backed a Tory motion calling for the legal advice to be published.

Afterwards, deputy First Minister John Swinney said he would consider the implications of the non-binding vote “with my ministerial colleagues, consistent with our obligation in the ministerial code, and will advise parliament accordingly in response".

Tory MSP Margaret Mitchell, who sits on the inquiry, today asked Ms Sturgeon for the government’s response and a date for publication of the advice.

Ms Sturgeon responded: “If I was to do what Margaret Mitchell has asked me to do there I would be blatantly breaching the ministerial code – perhaps that is what Margaret Mitchell wants me to do.”

The First Minister said the code states “ministers must not divulge the contents of legal advice” although it says in “exceptional circumstances ministers may decide that he balance of public interest favours disclosure”.

In those circumstances they must obtain the prior consent of law officers before doing so, she explained.

Ms Sturgeon said consent to release legal advice will “only be given if there are compelling reasons”.

She added: “Ministers have to consider now the vote last night, the Deputy First Minister made clear ministers will do so.

“I have rightly, I think, recused myself from that decision and as John Swinney said to Parliament last night he will advise Parliament accordingly in due course of our response.”

The issue of a clash with the ministerial code was helpfully raised in yesterday’s debate by one of Ms Sturgeon’s oldest friends at Holyrood, former health secretary Shona Robison.

Ms Mitchell said later: “MSPs across the Scottish Parliament have instructed the government to release the legal advice they received for the Alex Salmond judicial review.

“Instead of a straightforward, firm commitment that the legal advice would be published as soon as possible, all we heard from the First Minister today was excuses.

 “It is a matter of profound concern for our parliamentary democracy that the government appears to be intent on continuing to evade scrutiny and to ignore the will of the Scottish Parliament.

“The integrity of the Parliament is at stake. The committee cannot carry out its remit without the legal advice. If the government continue to refuse to release it, the public will never know why more than £500,000 of their money was handed to Alex Salmond.”

Ms Sturgeon’s official spokesman refused to say if the Government would even ask the law officers for permission to publish the advice.

Ms Sturgeon is currently the subject of an independent investigation under the ministerial code.

She is accused of failing to tell her officials on time and in full about her contacts with Mr Salmond while he was under investigation in 2018.

Opposition parties and Mr Salmond want the ethics probe widened to look at whether Ms Sturgeon also misled parliament, a potential resigantion issue if proved.