The SCOTTISH Government has been accused of “breath-taking levels of incompetence” after newly-released court documents revealed it admitted the issue that doomed its legal fight with Alex Salmond a full two months before it threw in the towel.

The Government confirmed in November 2018 that the official who investigated claims of sexual misconduct against Mr Salmond had been in prior contact with his accusers.

However it was not until January 2019 that the Government formally conceded defeat.

The Government’s failure to appoint an investigating officer with no connection to Mr Salmond’s case meant the whole procedure was “tainted by apparent bias”.

READ MORE: Alex Salmond inquiry: key court document published

The open record states that the Scottish Government “should not have appointed” Judith Mackinnon as investigating officer when she had already met and counselled complainants.

It adds that Ms Mackinnon “should not have accepted the appointment” and “that appointment was unlawful and unfair.”

That error and the Government’s slow approach, with critical evidence released “very late in the day” to Mr Salmond, contributed to a higher than usual bill for taxpayers, with the public purse left footing a £512,000 bill for the former First Minister’s legal costs.

The timeline is revealed in a pivotal court document which has finally been published.

The Holyrood inquiry into the Salmond affair today released the open record, which sets out the detailed pleadings of each side, ahead of evidence hearings resuming on Tuesday.

The document runs to more than 100 pages.

The Government initially suggested the pleadings belonged to the court and could not be released to the inquiry.

However SNP ministers and the former first minister later agreed to the release of a redacted version of their own copy.

READ MORE: Alex Salmond demands judicial review legal advice is published

It catalogues weeks of to-ing and fro-ing between the two sides in late 2018 over legal arguments and defences and the sharing of Government files with Mr Salmond's lawyers.

The Government's top law officer, the Lord Advocate James Wolffe, admitted last month that the Government's mishandling of this process ultimately added to the bill to the public purse.

The belated disclosure of key information was "unsatisfactory", with material released "very late in the day", he said, leading to higher than usual costs being awarded against the Government.

MSPs are looking at how the Government botched a probe into sexual misconduct claims made against Mr Salmond in 2018.

He launched a crowd-funded judicial review at the Court of Session contesting its findings.

He succeeded in having the whole exercise set aside, or ‘reduced’, after showing it was unfair, unlawful and “tainted by apparent bias”.

The Government’s mistake - appointing an investigating officer who was in prior contact with his accusers instead of someone unconnected - meant taxpayers paid Mr Salmond’s costs.

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

However her officials and ministers have since tried to block witnesses and withheld swathes of evidence, citing “legal privilege” despite waiving it for three judge-led inquiries.

In recent weeks, after MSPs complained of high-level “obstruction”, there has been more movement on the release of evidence.

However Mr Salmond this week had to be given a “firm request” to make his written submission by October 27 after missing three previous deadlines dating back to August 4.

The former FM’s has said various legal obstacles stop him providing the full account the inquiry deserves, including material from his separate criminal trial at which he was acquitted of 13 counts of sexual assault.

Scottish Labour has said that these revelations have demonstrated the utter incompetence of the Scottish Government and the culture of secrecy that surrounded the government at the time.

READ MORE: In Full: Alex Salmond's demand for legal advice to be published

Scottish Labour deputy leader Jackie Baillie said: “By refusing to concede to the petition for months after admitting that Ms Mackinnon had been in contact with complainants, the Scottish Government has displayed breath-taking levels of incompetence and bullishness.

“This investigation was doomed from the beginning, with roles being blurred and decisions being taken that opened the process up to legitimate allegations of bias.

“What is also clear is that the culture of secrecy, that the Scottish Parliament committee investigating this issue has had to put up with over the last few months, was alive and well during this investigation, with correspondence and documents being handed over begrudgingly, if at all.”

She added: “The botched judicial review left the public purse at least half a million pounds lighter and preoccupied civil servants and court officials for months.

“That the Scottish Government refused to concede to the petition despite clear breaches in protocol demonstrates that no price was too high to pay to cover up their incompetence and secrecy.”

A Scottish Government spokesman said: “We are committed to co-operating fully with the inquiry and that is the right place for all of the relevant evidence to be heard. We will not pre-empt the outcome of the committee’s hearing.

“We are providing the relevant information requested by the committee so far as is possible given the confidentiality, data protection and legal restrictions that apply.

“We have already provided the committee with over 1,000 pages of relevant material, responding directly to the questions asked by the committee, and Scottish Government witnesses have provided more than 10 hours of oral evidence so far.

“As a further example of our commitment to provide all possible material to the committee, we intend to initiate legal proceedings seeking to allow the release of further documents.”