Former first minister Alex Salmond has called for Scotland's top civil servant to resign after winning a legal case concerning the Scottish Government's handling of sexual misconduct allegations against him.
Scotland's highest civil court has ruled the Scottish Government’s handling of the allegations against Mr Salmond was unlawful.
At a hearing in the Court of Session in Edinburgh, Judge Lord Pentland said the decisions were "unlawful in respect that they were procedurally unfair and that they were tainted with apparent bias".
Judge Pentland heard that the person who investigated the complaints of sexual misconduct - which are strongly denied by Mr Salmond - had involvement with the complainers prior to being appointed investigating officer.
After the ruling, Mr Salmond thanked his family and friends "for standing with me over the last few months".
He said: "The last time I was in that court, it was to be sworn in as first minister of Scotland.
"I never thought at any point I would be taking the Scottish Government to court."
Mr Salmond said there was an "unnecessary" cost on the public purse as a result of his case against the Government and suggested Scotland’s most senior civil servant, Permanent Secretary Leslie Evans, should resign.
He added: "The process has already been admitted as unlawful, as unfair and as tainted by bias, you couldn't get more tainted, so when she's got some time for mature reflection, I hope that the permanent secretary considers her position, not events in the future."
He said: "I'm not putting out the bunting today, yes I'm glad to have won, I am really really sad to be forced to take this action against a government I led for eight years."
Ms Evans said an internal review would be carried out by the Scottish Government.
"The single procedural flaw which led to this decision is deeply regrettable," she said.
"In particular, I regret the distress it will cause to the two women who raised the complaints."
She added: "The Scottish Government has acted in good faith at all times and will continue to do so.
"It was right and proper that these complaints were investigated and I stand by the decision to carry out that investigation.
"It is also important to note that the procedural flaw in the investigation does not have implications, one way or the other, for the substance of the complaints or the credibility of the complainers.
"The Judicial Review was never about the substance of the complaints, but about the process that took place to investigate those complaints."
As a result she said it was open to the Scottish Government to re-investigate the complaints, adding that "subject to the views of the complainants, it would be our intention to consider this".
But Ms Evans said this would "only be once ongoing police inquiries have concluded".