The way the Scottish Government handled the release of documents relating to the so-called Salmond files to the Information Commissioner was “shambolic”, he has said.

David Hamilton said the length of time it took to produce the information was “ridiculous” and that it could not have been done in a “more inefficient and impractical way”.

The Scottish Government was admonished by the Court of Session on Wednesday for failing to respond to an order from the Information Commissioner in time.

Mr Hamilton had ordered ministers to release information relating to the Hamilton Inquiry – a probe launched by Nicola Sturgeon into whether she had breached the ministerial code in relation to the Holyrood inquiry into her predecessor Alex Salmond.

It's just absolutely shambolic the way it's been handled

David Hamilton, Scotland's Information Commissioner

Mr Salmond – who died in 2024 – had been accused of sexual harassment by two civil servants, but the investigation into the allegations had been “tainted by apparent bias” according to a judge, who awarded him more than £500,000 in damages.

A freedom of information request was filed by campaigner Benjamin Harrop in relation to the Hamilton probe, but never fully complied with by the Government, despite repeated calls for it to do so by Mr Hamilton.

Mr Hamilton took the Scottish Government to court, and welcomed the court’s decision on Wednesday.

First Minister John Swinney previously said the files could not be released in their entirety over fears they could identify complainers in the later criminal trial against Mr Salmond – in which he was cleared of all charges – which would violate a court order and could also be considered contempt.

The order was complied with on February 24 of this year, more than a month after the January 15 deadline set by the commissioner.

Speaking on BBC Radio Scotland’s Breakfast programme on Thursday, Mr Hamilton said the complexity of the documents had been “over-egged” and that they could have been provided sooner.

He said: “I know these documents inside out now because I’ve dealt with so many cases. This work should have been done already because it’s been done for other elements of the case.

“It didn’t start until at least a month after they were meant to get working on it, and of course the initial submissions they made had said that it would take them a length of time to do that – I think it was 44 hours, they’d claimed

“The fact that it took them in total nearly 12 weeks is just absolutely ridiculous and you couldn’t have done this exercise in a more inefficient and impractical way.

“And having seen the information that’s been released – full of duplications, full of inconsistencies, things done in different ways, I mean it was an exercise on how not to release information that is sensitive.”

He added: “I think the whole package went to a fourth version that’s been released, so it’s just absolutely shambolic the way it’s been handled, and given the size of the Scottish Government, that is something that should have been done easily within time.”

In her ruling Judge Lady Poole wrote that failure to comply in time was not contempt of court, but “contempt of the commissioner”, allowing the court to “invoke powers available to it in relation to contempt of court”.

Mr Hamilton said it was “highly embarrassing” for the Scottish Government to have been admonished.

A Scottish Government spokesperson previously said: “The material required to be released under the Information Commissioner’s Decision Notice was published on February 24.

“As Scottish ministers set out to Parliament, they have to balance their obligations under Freedom of Information legislation and the need to avoid identification of alleged victims in cases of sexual assault.

“We acknowledge and respect the ruling in this case and will consider it in detail.”