THE Scottish Government has paid £512,250 in legal costs to Alex Salmond over its botched investigation into sexual harassment allegations.

The former first minister won a judicial review at the Court of Session in January after the Government admitted its probe had been fundamentally flawed.

It emerged in court that the official who investigated two claims made against Salmond had been in prior contact with his accusers for several weeks.

That, the judge said, rendered the investigation unlawful, procedurally unfair and “tainted by apparent bias”.

READ MORE: Kevin McKenna: Here's why the Wings party has my vote

On Tuesday, a spokesman for the Scottish Government confirmed that a “final settlement of £512,250 has been made to Mr Salmond for legal costs arising from his petition for judicial review.”

The allegations against the ex-SNP leader date from 2013, when he was first minister.

Salmond’s lawyers served legal papers on the Scottish Government last August citing concerns over process.

The country’s top civil servant, Permanent Secretary Leslie Evans, rejected the claims saying the Government would “vigorously defend” its position.

But just days into the court case she conceded that the Government had breached its own guidelines.

A parliamentary inquiry into the Scottish Government’s handling of the internal complaints has been put on hold until a separate criminal case is complete.

Salmond has been charged with nine counts of sexual assault, two of attempted rape, two of indecent assault and one of breach of the peace. He has denied all charges and the case is expected to call early next year

A spokesman for 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”.

Scottish Tory MSP Donald Cameron, who is a member of the parliamentary inquiry said questions needed to be asked about how the government could have got it wrong.

“This is taxpayers’ money that will be handed over to Alex Salmond thanks to the appalling way these complaints were dealt with,” he said.

“In addition to this wasted money, the two people who made these complaints have been badly let down by the Scottish Government.

“That is exactly why the Holyrood inquiry that we called for is necessary.”