The Scottish Government has given ground in the row with the Holyrood Inquiry over legal advice in the Alex Salmond case.

Deputy First Minister John Swinney, who has so far declined to hand over the material, has told MSPs he is “keen” to find a way that allows the committee to access the material.

A Holyrood committee is examining how in 2018 the SNP government mishandled the investigation of sexual misconduct allegations against Salmond.

The ex First Minister pursued a judicial review and it was agreed the internal probe had been unlawful and tainted by apparent bias.

The fiasco cost the taxpayer over £500,000 and destroyed the long-standing friendship between Nicola Sturgeon and Salmond.

However, the committee has been unable to access all the documents it has requested from the government, such as its legal advice in relation to Salmond’s judicial review.

The committee wants to know when the government was advised it was on course to lose the court battle, but John Swinney resisted disclosure on the grounds of legal privilege.

He pointed to a section of the ministerial code which states that his colleagues “must not” divulge the contents of legal advice.

Another section states that the prior consent of law officers must be sought if ministers feel the balance of public interest lies in disclosure.

Parliament has twice voted for the material to be released and MSPs have been waiting for the government’s response.

Swinney, who is dealing with the committee on the issue, has now written to the Holyrood Inquiry.

It is understood the letter states: “I have discussed this issue with cabinet colleagues this morning, and I am keen to consider with you how we might establish a practical way that enables the committee to have access to the information it seeks.”