Police spent almost £850,000 investigating Alex Salmond during the Crown Office’s failed attempt to prosecute him for sexual offences.
Official documents revealed the huge cost of Operation Diem.
It lasted almost two years and at its height had 14 dedicated officers led by Detective Chief Superintendent Lesley Boal.
They carried out 386 interviews and the former first minister was eventually charged with 14 offences – before being cleared of all allegations in the High Court.

The £834,000 cost has been revealed in a letter from Police Scotland Chief Constable Iain Livingstone to Holyrood’s Public Audit Committee.
It states: “A small dedicated team worked on Operation Diem from Fettes Police Station, Edinburgh, between August 2018 and April 2020.
“This team was comprised of seven officers from August 2018 rising to a maximum of 14 during the months between October 2018 and July 2019 before steadily reducing in 2020.
“The indicative cost of this staffing profile is just over £810,000. In addition, there were non-staff costs captured in respect of operation Diem totalling just over £24,000.”
First Minister Nicola Sturgeon’s most senior civil servant Leslie Evans triggered the investigation when she reported internal Scottish Government harassment allegations involving Salmond to prosecutors, against the will of the women involved.
She claimed she balanced their objections with the “potential criminality” when she told the Crown Office in 2018.
The Sunday Mail understands it was at this point Crown Agent and Crown Office chief executive David Harvie ordered police to investigate.
In September 2018 we revealed how Boal was promised “unprecedented resources”.
The Scottish Government was forced to abandon its internal probe into Salmond after a judge ruled the process to have been biased and unlawful in a judicial review.

Former Scottish justice secretary and MP Kenny MacAskill said: “We already know that the Scottish Government spent over £600,000 on its failed defence of Alex Salmond’s Judicial Review.
"And we now know the police were forced to spend £834,000 on the orders of the Crown Office to investigate criminality – none of which was found.
"The final bill will run into millions and it is still mounting because the police are being instructed to interview people over leaks.
“After I released WhatsApp messages relating to SNP chief executive Peter Murrell, the police interviewed me on instruction of the Crown. The officers clearly didn’t know why they were being told to do that.
“In the middle of a pandemic, Crown agent David Harvie is still busy ordering hard-pressed police officers around Scotland to look for whistleblowers leaking information to MPs.
"I am going to write to the Scottish Police Authority because this is becoming staggering.
“Police resources are being wasted on the direction of the Crown Office to continue this inexplicable war against Alex Salmond.
“They have thrown everything bar the kitchen sink at it and questions need to be asked why, given he was acquitted of all charges. No wonder parliamentarians are looking for answers to this monumental waste of public money.”
A Police Scotland spokesman insisted a “thorough” investigation was carried out into Salmond.
He added: “Anyone who reports sexual crime, no matter when it happened or who was involved, will be listened to and treated with dignity and respect.”
The Crown Office insisted it had taken a “rigorous approach to allegations of sexual offending”.
A spokesman said: “Where there is suspicion of criminal behaviour – be that of sexual assault or the misuse of sensitive personal data – it is appropriate that the police investigate.
“In all matters relating to the investigation and prosecution of Alex Salmond, and in subsequent issues, COPFS has acted with impartiality and fairness to apply the law professionally, independently and in the public interest.”
Salmond and Sturgeon have now given evidence to an MSP committee probing the Scottish Government’s botched sexual -harassment probe.
The result of a separate inquiry led by James Hamilton QC into whether Sturgeon broke the ministerial code is expected within days.
She is accused of multiple breaches over her handling of the judicial review.
MSPs on the Salmond inquiry committee have already decided they were misled by the First Minister.
Salmond’s legal team claim there was a plot against him involving figures including Sturgeon’s husband Murrell.
We previously revealed how evidence destroying the Scottish Government’s case in a judicial review was only disclosed after demands were made to examine emails held by Evans.
Scotland’s most senior lawyer Roddy Dunlop QC was forced to tell a court he was “personally horrified” as the case crumbled and Lord Advocate James Wolffe ordered a trawl of the civil servant’s files.
The £512,000 legal bill was allowed to clock up as Dunlop’s advice to abandon the case was ignored.
The SNP declined to comment.