ALEX Salmond has agreed in principle to appear in person before MSPs to give potentially devastating evidence against Nicola Sturgeon.

The former First Minister has confirmed he is ready to testify under oath to a Holyrood inquiry on Wednesday, a source told the Herald.

It sets up an extraordinary clash between the SNP's two most successful leaders, and threatens to inflame deep and bitter divisions within the party.

Mr Salmond's confirmation followed the parliament’s management body last night approving publication of a written submission in which he accuses Ms Sturgeon of repeatedly misleading MSPs.

READ MORE: Holyrood agrees to publish explosive Alex Salmond evidence

He claims she therefore breached the Scottish ministerial code - a resignation offence which she strongly denies.

The inquiry had refused to publish an earlier version on legal grounds in case it breached court orders, data or privacy laws.

However the Scottish Parliamentary Corporate Body, which has the final say on the issue, agreed to publish a second, revised version from Mr Salmond which was drafted to overcome the previous legal obstacles.

Mr Salmond had refused to appear before the inquiry  unless his written evidence was published by it.

Publication means his submission can appear in the inquiry's final report and be used to question witnesses.

Ms Sturgeon is due to give evidence a week after her predecessor.

Mr Salmond's appearance is conditional on the inquiry publishing his latest written evidence with redactions he considers acceptable - although there seems little chance of a last-minute upset as both Mr Salmond and most of the MSPs on the inquiry want him to appear.

A second source said Mr Salmond's "working assumption" was that he would be going, but a final agreement had yet to be nailed down. 

Mr Salmond's appearance is dreaded in some quarters of the SNP, as it will generate TV clips of him attacking Ms Sturgeon which the opposition parties will seize on.

After the SPCB made its decision to publish, clearing the way for Mr Salmond to testify, the Tories, Labour and Liberal Democrats all welcomed the breakthrough.

However the SNP issued a splenetic attack on the SPCB's decision, claiming it had defied legal advice to put the anonymity of female complainers in jeopardy, and questioned if SPCB members would have made the same decision if their female relatives were involved.

The Tories said it showed the SNP were well and truly "rattled" at the prospect of Mr Salmond giving evidence.

The SPCB is chaired by Presiding Officer Ken Macintosh, and has an MSP from each of Holyrood's five parties.

READ MORE: Holyrood election result may take days as overnight count scrapped due to Covid

The inquiry is investigating how the Scottish Government botched a sexual misconduct probe into complaints made against Mr Salmond in early 2018, more than three years after he resigned as First Minister.

He had the exercise overturned in a judicial review, showing it had been "tainted by apparent bias", a Government flaw that left taxpayers with a £512,000 bill for his costs.

He was later charged with sexual assault but acquitted on all counts at a trial last March.

After the SPCB decision, Rape Crisis Scotland wrote to the inquiry demanding  assurances that the parliament would not breach the court order protecting the anonymity of the complainers in Mr Salmond’s criminal trial.

In a reply today, Mr Macintosh said protecting the complainers anonymity was of “vital importance” to the parliament, which would “of course comply” with the terms of the court order.