John Swinney could be at risk of breaching the ministerial code if he pursues legal action against a watchdog ruling in relation to inquiries in the wake of a probe into Nicola Sturgeon, according to senior SNP MSP Fergus Ewing.

Mr Ewing has written to the First Minister and the head of the civil service in Scotland demanding to know how much public money has been spent on a long running case relating to freedom of information (FOI) requests linked to the investigation by James Hamilton into Ms Sturgeon.

In his letter to Mr Swinney, the former rural affairs secretary notes rules relating to government finances that ministers must abide by.

Mr Ewing's intervention follows the Scottish Information Commissioner's ruling on Monday which requires the Scottish Government to disclose legal advice on an failed FOI appeal relating to the Hamilton probe which found Ms Sturgeon had not breached the ministerial code.



The Scottish Government must disclose the advice by October 26 or make an appeal on the ruling at the Court of Session within 42 days after the date of the commissioner's decision.

Mr Hamilton's inquiry was into whether Ms Sturgeon broke the ministerial code when her predecessor Alex Salmond was being investigated for sexual harassment by the Scottish Government. 

Mr Salmond won a judicial review at the Court of Session in 2019 against the Scottish Government over the investigation with the judges ruling it unlawful and “tainted by apparent bias”. 

Irish lawyer James Hamilton (Image: Niall Carson) Under the court ruling the Scottish Government had to pay £512,000 to Mr Salmond for his legal costs.

The Scottish Government has previously said its own spending on external legal fees amounted to £118,523, taking its total legal bill to £630,773, excluding its internal costs.

Mr Salmond was cleared of all charges at a separate criminal trial in 2020.

Mr Ewing, the long serving MSP for Inverness and Nairn, is now trying to find out how much public money has been spent by the Scottish Government to date in respect of legal costs defending the judicial review, two court actions relating to the FOI case and estimated costs of any new legal appeal it may take.

SNP MSP Fergus Ewing (Image: PA)

He wants the Scottish Government to reveal the fees it paid to third party solicitors and advocates, as well as the costs to the Scottish Government's own legal department in relation to the cases.

Attaching a front page article from The Herald on Wednesday, where he raised concerns that the government was pursuing the actions to keep important information from the public, the MSP told Mr Swinney he was seeking: "1. The costs of the Scottish Government in defending the action of judicial review.     

"2. The legal costs of the challenge taken to the Court of Session to the decision of the Freedom of Information (FOI) Commissioner in respect of release of the Hamilton Report - the full one.

"3. The further costs of opposing the release of the legal advice regarding 2 which led to the further defeat at the hands of the FOI Commissioner on Monday the 9th September, 2024.

"4.  Further costs, which may be estimated costs, of making a further court challenge to the said decision of the FOI Commission on 9 September, in the event that the Scottish Government appeal to the Inner House of the Court of Session.

 "What is the estimate of these expenses if incurred?  Has any estimate been made?  If not, will these now be estimated."

He added: "Finally, can consideration be given as to whether to incur such further costs would be a waste of money and a breach of the ministerial code in respect of the rules in the finance manual and in the requirement of financial propriety."

The ministerial code, which sets out the rules for government ministers to work under, makes provision for "an accountable officer", a role which should be held by the permanent secretary.

"The essence of the accountable officer's role is a personal responsibility for the propriety and regularity of the public finances for which they have stewardship and ensuring the economic, efficient and effective use of resources," the ministerial code states.

In his letter to the permanent secretary John-Paul Marks, Mr Ewing sought a meeting with him and cautioned against further spending on legal action on the case.

"I feel that the further expenditure of public money on more legal challenges in addition to those that have already cost the taxpayer dearly would be an egregious waste of public money and lead to very serious problems for those who approve such expenditure," he said.

An initial FOI inquiry was made by a member of the public after the Hamilton report was published in March 2021. The report cleared Ms Sturgeon of breaching the ministerial code though his report did express frustrations over redactions he was obliged to make because of court orders.

The member of the public asked the Scottish Government for "all of the written evidence submitted to Mr Hamilton as part of his investigation" including evidence from the former First Minister, her chief of staff and any other individuals within the Scottish Government who had submitted evidence.

Scottish ministers responded in May 2021 declining the request "on the grounds that: (1) information held by or on behalf of an independent adviser such as Mr Hamilton was not within the scope of the legislation and that it exempted from disclosure any information that was already published.

After failing to get the government to review its decision, the member of the public appealed to the information commissioner, who ruled that information relating to the Hamilton investigation into Ms Sturgeon under the ministerial code was held by the Scottish Government and should therefore be considered by it when responding to FOI requests.

The Scottish Government then appealed to the Court of Session in March 2023, with the court finding in favour of the commissioner in December 2023.  

Following the court’s ruling, a member of the public requested copies of legal advice received by the Scottish Government relating to its decision to appeal. 

The Scottish Government refused this request, citing the FOI Act exemption which protects confidential legal information. This refusal was subsequently appealed to the commissioner who on Monday ruled in favour of the member of the public.  

His decision requires that the legal advice be disclosed, with certain information, such as personal information, redacted. 

A Scottish Government spokesperson said: “The Scottish Government has received the Scottish Information Commissioner’s decision and is considering its contents.

"It would not be appropriate for us to comment further on a live appeal case. The Scottish Government has received the letters and will respond in due course.”