MSPs investigating the botched handling of complaints against Alex Salmond have compelled the Crown Office to hand over documents after being told they may contain evidence that officials attempted to “damage the reputation” of the former first minister.

Linda Fabiani, who chairs the Holyrood committee investigating the handling of complaints, has written to the Crown Office and Procurator Fiscal Service (COPFS), invoking Section 24 of the Scotland Act (1998) in order to secure the release of vital correspondence.

A Holyrood inquiry is looking into how the Scottish Government botched its probe into sexual misconduct allegations made against Mr Salmond in 2018.

Mr Salmond had the exercise set aside in a judicial review after the Government conceded it was unlawful and “tainted by apparent bias”, an error that left taxpayers with a £512,000 bill for his legal costs.

He was later cleared of multiple charges of sexual assault at the High Court in Edinburgh.

The committee has compelled the court services to release any text or WhatsApp messages between Susan Ruddick, CEO of the SNP and members of the Scottish Government, civil servants and special advisers between August 2018 and January 2019 - including those relevant to the Judicial Review brought by Mr Salmond.

MSPs have also insisted that documents relevant to the circumstances in which details of complaints under the Scottish Government procedure on sexual harassment complaints was leaked to the Daily Record in August 2018, following the investigation by the Scottish Government and before the judicial review by Alex Salmond.

The committee has given the Crown Office until January 29 to hand over the documents.

In her letter to the COPFS, Ms Fabiani states that the committee has been told that documents may exist showing that “elements of the Scottish Government including special advisers” used the complaints procedure and complaints themselves “to damage the reputation of Alex Salmond”, adding that “it is in the public interest to understand fully the actions of the Scottish Government”.

Ms Fabiani said: “Throughout this inquiry, the committee has been determined to get as much information as possible to inform its task.

“It was agreed that the committee will use its powers under Section 23 of the Scotland Act to require the Crown Office to produce a number of documents.

“This is a step that hasn’t been taken lightly, and is a first for this Parliament, but which the committee felt was needed as it continues its vital work.”

The committee has also written again to the Scottish Government asking for the release of the legal advice from external counsel, following two separate votes in the parliament instructing the release of all legal advice, which ministers are yet to comply with.

Scottish Labour interim leader and committee member Jackie Baillie said: “This unprecedented action is necessary to cut through the web of secrecy that the Scottish Government has woven and to allow the Committee to live up to its remit.

“At every turn, the SNP government has sought to hide vital material from the Committee in a vain effort to leave it a toothless entity; a talking-shop without power.

“Enough is enough – the secrecy must end. The Committee must receive the documents requested forthwith so that the truth of this sorry affair can be uncovered.”

Scottish Conservative spokesman on the Salmond inquiry, Murdo Fraser MSP, said: “The Scottish Parliament has twice called for the legal advice to be published and yet the committee is once again having to demand that it is released.

“The committee has consistently been blocked from performing its remit by SNP ministers. The level of obstruction has been extraordinary.

“We have escalated our requests to seek further documents from the Crown in an effort to uncover how the government let down women so badly and lost more than £500,000 of taxpayers’ money.”