There would be "no bar" to Alex Salmond successfully rejoining the SNP if he clears his name, the First Minister has indicated.

Nicola Sturgeon stressed that due process must be allowed to take its course after two women made complaints of sexual harassment against her predecessor.

Hypothetically, she said "everybody in the SNP would love to think" Salmond could return to the party but added she would not "pre-judge" the matter.

The First Minister also issued a robust defence of the Scottish Government's permanent secretary Leslie Evans, who has come in for criticism from Salmond.

He has launched a judicial review against the complaints process activated by Ms Evans against him and wrote to her this week demanding an inquiry over leaks regarding his case to the press.

The former first minister announced his resignation from the SNP on Wednesday night and launched a crowdfunder to assist with his legal bills which has already raised around £80,000.

The complaints date back to December 2013 when Salmond was still in office, and supposedly took place in Bute House, the official residence of the First Minister.

He denies the allegations and is taking the government to the Court of Session over its probe into the claims, which he deems to have been unfair.

In a YouTube video posted on Wednesday, Salmond said he would reapply for SNP membership after he clears his name.

Speaking to STV News at Prestwick Airport, where she announced £5m of fresh funding for the aerospace industry, Sturgeon said she "absolutely accept(s) that Alec says he's innocent of all complaints made".

Asked if he would be eligible to rejoin the SNP if he does clear his name, the First Minister replied: "In the fullness of time, of course."

Pressed further on if there would be no bar to his reapplying for party membership in such a scenario, Sturgeon said: "Of course that would be the case.

"But let's first of all make sure that in the interests of all concerned, we have that due process and don't start to pre-judge or get ahead of where we are right now.

"Everybody knows how close I've been to Alex Salmond over a long period of time, how painful this is for me, for the SNP.

"But that is secondary to making sure that when complaints come forward, they are properly considered and that is what is most important right now.

"It's what is most important for those who have brought forward complaints, and actually it's what most important for Alex Salmond."

She added: "Everybody in the SNP would love to think we would be in a position where Alex Salmond would be back in the SNP.

"But first of all the allegations, the complaints that have been made, must be properly investigated."

The sexual misconduct claims against Salmond first emerged last week when the former MP released a statement prompted by an inquiry from the Daily Record.

Police Scotland confirmed last Friday that the complaints have been passed to the force but said its assessment of the allegations was still at an early stage.

Salmond has refuted all claims of harassment and accuses the Scottish Government of denying him the right to put his own case forward fairly.

The Scottish Government has vowed to "vigorously" defend itself against his accusations in court, and has alluded to "material inaccuracies" in Salmond's public statements.

All three main civil service unions - the PCS, FDA and Prospect - issued a joint statement this week backing Ms Evans' handling of the civil service probe into the complaints.

And Dave Penman, general secretary of the FDA - which represents senior civil servants - has accused Salmond of "nasty, vindictive and deliberate" attacks on the permanent secretary.

Writing in The Times newspaper, Mr Penman said: "While accused of sexual harassment, a claim he denies, Mr Salmond attacks and threatens with legal action the individual tasked with investigating those complaints.

"As a former first minister, he knows Ms Evans is duty-bound to investigate complaints. Not only is this nasty, vindictive and deliberate, it also has broader consequences.

"What message does this send to those tasked with investigating complaints, let alone the real victims here?

"Mr Salmond's actions undermine the integrity and impartiality of the civil service, thereby damaging the Scottish Government itself. Clearly, it's a price he believes is worth paying."

Asked about Ms Evans, the First Minister told STV she had her full support.

Sturgeon said: "The permanent secretary was doing her job, and there was a pre-existing process in place.

"It was important that when complaints were received, she applied that without fear or favour, without any consideration of the identity or the political allegiance of the person being complained of."

The Scottish Government established a new procedure on handling harassment complaints involving current or former ministers in December last year.

This process was established in the wake of the #MeToo movement, which saw allegations of sexual harassment and sexual assault levelled against a host of high-profile men around the world.

Pressed for her view on Salmond's fundraising drive for his upcoming legal battle with her government, the First Minister replied: "The issues about the appropriateness of a crowdfunder are, I think, questions you really need to put to Alex Salmond."

Scottish Labour accused Salmond of "dragging Scotland into the gutter" for launching a crowdfunding page to fight a case linked to sexual harassment claims.