The Spectator has won a legal action that could clear the way for Alex Salmond to give evidence to Holyrood about a botched Scottish government inquiry into allegations of sexual misconduct against him. A senior Scottish judge, Lady Dorrian, has agreed to amend a court order she imposed on what could be reported about Salmond’s criminal trial on 14 counts of alleged sexual assault, including an attempted rape, of which he was acquitted last year. The magazine and its publisher, Andrew Neil, had challenged her original order, arguing that it was too loosely worded and prevented journalists and Holyrood from reporting allegations made by Salmond about the government and its investigation. Dorrian accepted that her order could be tightened up, although in a different form to that originally sought by the Spectator. She issued an oral ruling on Thursday after a two-hour hearing, confirming that she would change it. The Scottish parliament confirmed its committee investigating the botched government inquiry would meet in emergency session at 2pm on Friday to consider the implication of the ruling. Soon after Dorrian’s ruling, Salmond’s lawyers, Levy McRae, who were also instructed by the Spectator in this legal action, wrote to the committee to say he is willing to give evidence. The firm has told MSPs they believe Dorrian’s order should clear the way for the parliament to publish Salmond’s evidence, with suitable redactions. On Tuesday, the committee narrowly voted against publishing Salmond’s submission for legal reasons linked to Dorrian’s original court order, largely because it had been published by the Spectator, with small redactions. Salmond then refused to give evidence to the committee, having been invited to do so on Tuesday this week, claiming he would be unable to properly make his case that figures within the Scottish National party and close to the first minister, Nicola Sturgeon, had conspired against him. The Spectator also argued Dorrian’s order breached article 10 of the European convention on human rights. It believes a submission to the committee by Geoff Aberdein, Salmond’s former chief of staff, should also be published to the extent that it does not breach the amended order. The Scottish parliament’s lawyers, who watched the hearing, will now have to decide whether Dorrian’s ruling changes their advice to the committee on publishing the Salmond and Aberdein submissions, probably in highly redacted form. However, the committee is running out of time. It is due to interview Sturgeon under oath on Tuesday, and has only six weeks to finish its inquiry and then write and publish its report before Holyrood is suspended for May’s parliamentary election. The Spectator used the same lawyers retained by Salmond in its challenge, from the law firm Levy McRae, which has acted for Salmond during his civil action against the government in 2018, his criminal trial in 2019 and the Holyrood inquiry. Ronnie Clancy QC, Salmond’s advocate in his civil action in 2018, acted for the Spectator in Thursday’s court hearing, while Duncan Hamilton, an advocate and close friend of Salmond’s, was Clancy’s junior. During Thursday’s hearing, Clancy argued that the original order had a chilling effect on the reporting of the Salmond controversy, and that it risked breaching the European convention on human rights and common law, which required courts to carefully limit any curbs on press freedom. He said the order had clearly influenced the Holyrood committee’s decisions and its legal advice. “It’s my submission that it is very much in the public interest that the terms and effect of the order be revisited to clarify its effects on the committee’s inquiry,” he said. “It’s self-evident that a basic principle of law is that if you’re imposing orders which have criminal sanctions, it’s very important that the person who might be at the receiving end of that order has a very clear idea of how they’re going to get into trouble by taking a certain course of action.” Alec Prentice QC, acting for the Crown Office, Scotland’s prosecution service, said it had no objection to Dorrian’s revisions. Lawyers for the Spectator, Salmond and the Scottish parliament will pore over Dorrian’s detailed ruling, which is due to be published on Monday.