Image copyright Getty Images Image caption Alex Salmond still faces multiple charges of attempted rape and sexual assault, which he denies

The Scottish government has paid out more than £500,000 in legal expenses to Alex Salmond over its flawed inquiry into sexual harassment claims.

The government admitted breaching its own guidelines after the former first minister challenged how allegations against him were handled.

He still faces multiple charges of attempted rape and sexual assault, which are separate to this review.

Mr Salmond denies the charges, and is expected to go on trial next year.

A spokesman for the Scottish government confirmed that a final settlement of £512,250 had been paid out for legal costs arising from the judicial review case.

A parliamentary inquiry into the handling of the internal complaints has been put on hold until the criminal case is complete.

Image copyright Getty Images Image caption The payout relates to Mr Salmond's judicial review at the Court of Session in Edinburgh

The Scottish government inquiry was sparked after allegations against the former first minister were submitted in January 2018.

Mr Salmond described the complaints - which dated back to his time as first minister, in 2013 - as "patently ridiculous".

He quit the SNP and brought a legal action against the government, saying the way the investigation had been handled was "unfair and unjust".

The government initially said it would defend its position "vigorously" in court, but admitted in January 2019 - shortly before the first hearing was due to take place - that there had been a "failure" in following its complaints-handling process.

The judicial review was focused entirely on the fairness of the government's procedures, and has no bearing on the separate police inquiry.

Image copyright Andrew Cowan Image caption MSPs are to hold an inquiry into how the government handled its internal investigation

A Holyrood inquiry into how the government handled the case has been set up, and First Minister Nicola Sturgeon has also referred herself to a conduct panel to check whether she breached the ministerial code in her dealings with her predecessor.

A spokesman for Mr Salmond said the coming parliamentary inquiry "may wish to ask the very obvious questions of why this unlawful process involving such a huge waste of public funds was undertaken by the Scottish government and who was responsible for these decisions".

The Scottish Conservatives also said the scale of the payout was "outrageous", and that "parliament must get to the bottom of exactly what happened".

However, the parliamentary inquiry has been put on hold until after the criminal case against Mr Salmond has run its course.

Two weeks after his victory in the judicial review, Mr Salmond was charged with 14 offences - including two charges of attempted rape, nine of sexual assault, two of indecent assault and one of breach of the peace.

He insisted he was innocent of any criminality and said he would defend himself "to the utmost".

BBC Scotland understands Mr Salmond's trial will not being until January 2020 at the earliest.