“WHAT did they know, and when did they know it'?” Since Watergate this has been the most dangerous question for a politician in the thick of it. Nicola Sturgeon is asked repeatedly about when she first learned of allegations of sexual impropriety against her predecessor and mentor, Alex Salmond – and has yet to give a wholly satisfactory answer.

But the parliamentary committee investigating the Scottish Government's botched handling of the Salmond judicial review has been wrestling with an equally serious question: what did the civil servants know, and when did they know it?

Why did they apparently proceed with a Court of Session action in January 2019 which they knew they were going to lose, at huge expense to the taxpayer and to the humiliation of the Scottish Government?

It's a mystery. And what about claims Nicola Sturgeon's husband, the SNP chief executive, Peter Murrell, discussed how to pressure Police Scotland and the Metropolitan Police into prosecuting the former First Minister – an astonishing breach of ethical standards if true. Leaked What's App messages, which haven't been denied, quote him saying: “The more fronts [Salmond] is having to firefight on the better for all complainers”.

MSPs have been alternately gob-smacked and bemused by what they have heard so far – which is not very much in the formal hearings. The Scottish Government has effectively pleaded the Fifth and refused to release any documentation that might incriminate. Civil servants, including the Permanent Secretary, Leslie Evans, have had collective amnesia.

MSPs were politely given the bum's rush from the Lord Advocate, James Woolfe. A casual observer could be forgiven for thinking that this is all a rather tedious issue about paper clip mis-management, rather than the most catastrophic legal defeat for any government since devolution.

The Court of Session was asked in January 2019 to review the Scottish Government's disciplinary procedure that had retrospectively found Mr Salmond guilty of sexual harassment of two civil servants.

The judge, Lord Pentland, ruled that the Scottish Government's procedure had been “unlawful” and “tainted with apparent bias” – in other words was a set up. He awarded Mr Salmond £512,000.

A week later, the former First Minister was arrested and charged with 13 counts of sexual harassment and attempted rape. These were thrown out by a female-dominated jury in March 2020 when Mrs Salmond was acquitted of all charges.

The glaring question is why the Scottish Government allowed this to go to court in the first place back in 2019? At the earliest opportunity, they collapsed the Court of Session case by admitting they'd acted unlawfully. This was before any witnesses could be questioned by Alex Salmond's lawyers. It was an epic mea culpa. It led to Salmond being awarded agent and client expenses at top whack.

This has led to much head-scratching amongst MSPs on the committee. They naturally wanted to know what legal advice the Government received in the autumn of 2018. Did the Government's external advisers not warn them that they were going to lose? But the Deputy First Minister, John Swinney, has deemed that it would “not be in the public interest” for legal advice to be disclosed, even though he accepts that “legal privilege” has often been waived in the past.

It is well nigh impossible for the committee to evaluate the Scottish Government's conduct if it doesn't know on what legal advice it was basing its actions.

You don't have to be a conspiracy theorists to suspect that the legal advice was that the Scottish Government didn't have a snowball's chance of winning. Otherwise, why keep it secret?

But this raises the further question: if the Government's legal advice was that it would lose, why didn't it collapse the case before it ever got to the Court of Session? Why wait until the very last minute if they didn't want civil servants to be asked awkward questions under oath?

Giving in to Salmond earlier would have been embarrassing, certainly, but not nearly as embarrassing as a judge ruling that the Scottish Government had acted against the law.

Did they hope something might turn up that might prevent the Court of Session actually hearing the case? A meteorite perhaps? A pandemic? Were they hoping the police might collar Salmond before the Court of Session ever convened? After all, Leslie Evans says she handed the allegations of misconduct to the police in August 2018 well in advance of the hearing.

There may be a perfectly reasonable explanation for this, but so far none has been forthcoming. We know from Whats App messages leaked last week, that the First Minister's husband, the SNP chief executive, Peter Murrell, was heavily involved and was pressing for the police to hurry up the prosecution. However, those leaked texts date from January – AFTER the disastrous Court of Session case.

It may be that Leslie Evans and co had no inkling of any impending police action and that they simply froze like rabbits in the face of the legal headlights – though that would be almost as bad. The way to clear all this up, surely, is for the Scottish Government to honour Nicola Sturgeon's promise to provide the inquiry with “all the documentation it requires”.

The Scottish Government should release the legal advice – it can't be any worse than what everyone suspects. The committee should insist that documents from the Salmond attempted rape trial relevant to its investigations should also be supplied. It is not, of course, MSPs' job to retry the criminal case and only those documents directly related to the conduct of civil servants before the judicial review should be made available to MSPs.

So far these have been denied. Indeed, even identifying that the documents exist is apparently unlawful. Mr Salmond's lawyers, Levy McRae, have been warned in no uncertain terms that any loose talk about trial documents, which of course they have seen, could lead them open to criminal penalty. Strong stuff.

Equally, Mr Salmond should not be shy of allowing documents from the Court of Session that relate to his conduct being released. He has nothing to fear from them since he has been exonerated by a jury in the highest court in the land. Yet, he has threatened court action himself if they are released by the Scottish Government. He may be right legally, but it looks bad.

This is a test of the Scottish Parliament as much as the Scottish Government. MSPs say they are hamstrung because they're not a judicial inquiry and can't force people to answer questions. Well, they could try being persuasive. Since their witnesses are under oath it should be possible to winkle a lot of information.

This inquiry would be dominating the front pages had it not been for the pandemic, and that has made it easier for the Government and law officers to stonewall. But the hard truth is that the Scottish Government has already been exposed for misconduct in the highest degree. It will be hard for the committee to top the censure from Lord Pentland in January 2019.

If acting unlawfully and losing half a million in costs is not considered a resignation matter for the civil servants and officials responsible, you wonder what is.

Our columns are a platform for writers to express their opinions. They do not necessarily represent the views of The Herald.