Alex Salmond has cleared the first legal hurdle to take his successor’s government to court over its handling of sexual misconduct allegations against him.

He was granted permission by the Court of Session to serve a petition for judicial review on the Scottish Government and its top official, Permanent Secretary Leslie Evans.

The petition is expected to be served on SNP ministers and Ms Evans in the coming days.

The development came as senior SNP members warned the fight between Mr Salmond and Nicola Sturgeon could overshadow the party’s conference in October.

One senior party member said the issue would put the gathering “under a dark cloud”, and make it impossible for Ms Sturgeon to call a second independence referendum this autumn.

The person said: “It’s devastating. This is going to have huge ramifications inside the SNP.

“It’s a mess. It’s an unholy mess. Certainly the SNP is not a winner.

“It’s bound to cast a shadow over conference. It’ll be a miserable atmosphere - the former leader under a cloud and Nicola under pressure from other parties about what she knew.”

Another SNP insider said: “This is going to linger on and on and stop us getting traction on the domestic agenda, on Brexit, on anything else.

“The big problem for Nicola is many party members hero-worship Alex, and many MPs, MSPs and folk in her cabinet owe their place to him. There’s the potential for civil war.”

One SNP parliamentarian said they were “uncomfortable” with the way Mr Salmond had conducted himself, but said it would not impact on the party or the timing of a referendum.

“Sadly, Alex is not the man he was. If he is intent on turning himself into George Galloway, that’s not going to do us much damage,” the source said.

“I think most of us are just watching from a distance and keeping as far away as possible.”

The crisis blew up last week when Ms Evans told the former First Minister she intended to publicise a previously confidential investigation into two misconduct complaints against him.

It followed Ms Evans, with Ms Sturgeon’s approval, introducing a new process for the handling of complaints against former ministers in December 2017.

That led to two women making complaints about Mr Salmond the following month, reportedly referring to his behaviour five years ago, when he was First Minister.

The Daily Record has reported that one complaint alleged Mr Salmond had made an unwanted sexual advance on a woman in a bedroom at Bute House in December 2013.

Mr Salmond has vehemently denied harassment or any criminality.

Ms Evans told Mr Salmond of the complaints in March, and in April Mr Salmond made the first of three contacts with Ms Sturgeon to discuss the issue, prompting Ms Sturgeon to tell him she would not intervene in the process.

After the civil service probe concluded, Ms Evans told Mr Salmond or her intent to go public with much of the information, prompting him to start legal action against the government.

A public copy of the first page of the petition, known as a walling copy, states Mr Salmond is seeking a judicial review of a “purported decision” of Ms Evans dated 21 August 2018.

Ms Evans is named as “first respondent”, with Scottish ministers the second respondents.

They will have 21 days to lodge defences.

A spokeswoman for the Court of Session said: “I can confirm that intimation and service has now been granted in the action Alex Salmond for Judicial Review.”