SNP ministers are set for another battle with the Scottish Information Commissioner over the contents of an investigation into Nicola Sturgeon.

Despite a defeat in the court of session, the Scottish Government is still refusing to share any details of the inquiry into whether or not the former first minister broke the ministerial code.

READ MORE: SNP reject bid to publish James Hamilton code probe evidence

In December, judges threw out the government’s bid to prevent the publication of evidence gathered by James Hamilton as part of his probe.

The Scottish Government had initially denied they held the information after receiving a freedom of information (FOI) request from Benjamin Harrop, a member of the public.

But the Court of Session sided with the Information Commissioner, who said this was a "wholly unrealistic" position.

That effectively means all evidence gathered by Mr Hamilton, including witness statements, are government documents and subject to FOI laws.

While that ruling did not compel the government to publish the evidence it meant they were obliged to reconsider the original FOI request, made by a member of the public.

In the wake of the court’s decision, The Herald also submitted an FOI request.

However, in their response to us back in January, the Scottish Government effectively said that every word on every page that has not already been released is still covered by an exemption.

This week, in response to a request for a review of those exemptions, the government has upheld their initial decision.

In 2021, James Hamilton, a former Irish prosecutor and the Scottish Government’s independent adviser on the ministerial code since, was tasked with investigating Ms Sturgeon's involvement in the Alex Salmond saga. 

The probe was launched after Ms Sturgeon referred herself following the collapse of the Scottish Government’s defence in a legal battle with her predecessor following a botched investigation into harassment allegations.

He cleared her of breaking the code, but his report did make some criticisms of the ex-SNP leader.

He said she had given MSPs an "incomplete narrative of events" by failing to tell them about a key meeting, and it was only because he deemed it "a genuine failure of recollection" and "not deliberate" that it did not amount to a breach of the code.

He said it was "regrettable" that Ms Sturgeon failed to mention the meeting, adding: "It is for the Scottish Parliament to decide whether they were in fact misled."

In his report, Mr Hamilton also marked his frustration with the redactions he was obliged to make in the report because of court orders, saying it was “impossible to give an accurate description of some of the relevant events dealt with in the report while at the same time complying with the court orders".

READ MORE: Ewing calls for Hamilton evidence to be made public after FOI defeat

While there were always going to be exemptions because of court orders and strict rules around personal data, in their initial response to The Herald the government also claims that “disclosure of the evidence" would likely "deter individuals from providing free and frank evidence in such investigations in future".

They said that in their view, “there is a credible risk that officials, particularly those in more junior grades, may feel inhibited in contributing to such investigations if they believe their evidence would be disclosed, other than through the final report prepared by the independent advisers".

Because of this, publishing the evidence would “substantially prejudice the effective conduct of investigations under the ministerial code".

Following the Scottish Government's decision to uphold their initial conclusion that no information should be released, The Herald has now appealed to David Hamilton, the Scottish Information Commissioner - no relation to James Hamilton. 

A Scottish Government spokesperson said: “The Court of Session did not instruct the Scottish Government to release material.

“In line with the Court’s judgment in December, we have reviewed the material held and responded in compliance with FOI legislation, applying statutory exemptions as appropriate.

“The Scottish Information Commissioner has confirmed the requirements of the decision notice have been complied with.”

The Scottish Information Commissioner’s office was unable to comment but said the appeal would be reviewed in due course.

Earlier this month, the SNP MSP Fergus Ewing tabled a number of questions in Holyrood asking ministers to publish the evidence given to Mr Hamilton.

He said it was in the "public interest to publish in full."