SNP ministers spent almost £120,000 of taxpayers' money hiring lawyers for the doomed defence of their botched sexual misconduct probe into Alex Salmond.

The figure, which does not include in-house legal work or Mr Salmond’s expenses, was only released after a freedom of information request.

The government said the “net cost of legal fees was £118,523” for the civil case, which will be met from the budget for Organisational and Development Operations.

The fees included "specialist external legal assistance", the hiring of respected QC Roddy Dunlop, court costs, and other outside legal work.

Mr Salmond's spokesman said the ultimate cost to the public pursue would be "many times" the £118,000 figure when other expenses were finally settled.

The Scottish Tories said the public would be "furious" at the expense.

READ MORE: Alex Salmond wins court battle with Scottish Government

The government spent the money to defend a judicial review launched by Mr Salmond last August over the handling of two sexual misconduct complaints against him.

Female civil servants complained in January 2018 that Mr Salmond, while serving as First Minister in 2013, has behaved inappropriately towards them.

They came forward after the government instituted a new complaints handling procedure, approved by Nicola Sturgeon, that covered former ministers.

However the case collapsed when the government was forced to hand over hundreds of previously secret documents which showed their probe had been fundamentally flawed.

READ MORE: Alex Salmond scores legal victory ahead of Scottish Government harassment case

They revealed Judith Mackinnon, the investigating officer appointed to examine the complaints against Mr Salmond, had been in prior contact with his accusers.

This contaminated the whole process, and the government had to admit its investigation had been unlawful, unfair and “tainted by apparent bias”.

Ministers abandoned the case at the Court of Session in January, leaving taxpayers to pick up most of Mr Salmond’s costs as part of a total legal bill estimated at £500,000.

After the climbdown, Ms Sturgeon defended the way the case had been overseen by her top civil servant, the Permanent Secretary Leslie Evans.

Mr Salmond, who had launched his legal action with a £100,000 crowdfunder campaign, said he felt vindicated and called for Ms Evans to resign.

It also emerged Ms Sturgeon had five contacts with Mr Salmond - three meetings and two phone calls - while he was being investigated by her officials.

Ms Sturgeon’s critics said her failure to report the first of those contacts to Ms Evans for two months breached the ministerial code of conduct.

Ms Sturgeon subsequently referred herself to outside ethics watchdogs.

The Scottish Parliament also established a special committee of inquiry to look into the collapse of the investigation and Ms Sturgeon’s conduct.

However all such inquiries have been put on hold or scaled back to a minimum to avoid prejudicing separate criminal proceedings against Mr Salmond.

READ MORE: Nicola Sturgeon and Alex Salmond at war over £500k legal case

In January, the former First Minister appeared at Edinburgh Sheriff Court charged with two attempted rapes, nine sexual assaults, two indecent assaults and one breach of the peace.

He vehemently denies any criminality.

A Scottish Government spokesperson said: “It was necessary and appropriate for the Scottish Government to instruct Counsel who have rights of audience in the Court of Session where Mr Salmond served his petition for judicial review.

"Specialist external legal assistance was also required to advise on the specific requirements of the petition.”

Scottish Conservative chief whip Maurice Golden said: "This unsavoury episode has not only damaged the public's faith in politics, but we now learn it is costing the taxpayer a fortune.

"This is an enormous sum and that is before you take into account any additional costs - which could be substantial. People will be furious that this saga is costing them money."

Scottish Labour Equalities spokesperson Pauline McNeill added: "Behind this waste of taxpayer money are two women who have been failed badly by the government's handling of this at each step. That's why we need answers as to why the government took the decisions it did at each stage."

A spokesman for Alex Salmond said: "The costs published today by the Scottish Government are partial in that they have dealt only with external legal advice and don't appear to have included the thousands of hours of time committed by legal and other officials in the Scottish Government.

"Nor have they included the costs of the Court of Session hearings, which involved a lengthy and complex Commission and Diligence process which they are now required to meet.

"In other words the FoI only deals with one part of one side of the full costs which will run to many times this estimate.

"In turn Mr Salmond's legal costs are currently being assessed and negotiated by his lawyers and if agreement cannot be reached with the government, they will ultimately be determined by the independent Court Auditor.

"In due course, the full monetary costs of the Scottish Government’s decision making will be clear for all to see and no doubt it will be of great interest to the Parliamentary inquires why the Scottish public should end up with the bill for the unlawful behaviour of the Government.

"These various inquiries may wish to ask why the Scottish Government refused to resolve this case before Court action became necessary and why they continued to defend the action until the case reached the very steps of the Court of Session itself.”

In response to Mr Salmond's statement, a government spokesman added: "We are limited in what we can say owing to the live criminal proceedings brought against Mr Salmond.

“But we are in discussion with Mr Salmond’s agents in relation to the expenses from his petition for judicial review, as is normal and appropriate in any litigation.

“The purpose of this discussion is to ensure that any costs paid to Mr Salmond are robustly assessed and scrutinised to ensure the minimum cost to the public purse.”