Former Scottish first minister Alex Salmond has resigned his membership of the SNP following allegations of sexual harassment, he said on Twitter.
In a statement, Salmond said: “I truly love the SNP and the wider independence movement in Scotland.
“They have been the defining commitment of my life.
“But today I have written to the National Secretary of the Party resigning my membership.”
Referring to recent allegations about his conduct, Salmond said: “So let me be clear again. I refute these two complaints of harassment and I absolutely reject any suggestion of criminality.
“I believe that all such issues must be treated seriously, confidentially and through a fair process.
“In this case confidentiality has been broken greatly to my detriment and in a way which puts at serious risk the anonymity of both complainants.”
Salmond said he was resigning as it was obvious that the party was under pressure to suspend him, which would cause “substantial internal division”.
He added that intends to apply to rejoin the SNP once he had an opportunity to clear his name.
Last week, it emerged he was suing the Scottish government over its handling of the harassment complaints.
At the same time as announcing his resignation, Salmond launched a crowdfunder to raise money for the court battle.
By Thursday morning, his £50,000 target had been exceeded with over 2,300 supporters donating a total of nearly £60,000.
When Salmond launched the crowdfunder, Scottish Labour business manager and women’s spokesperson Rhoda Grant told HuffPost UK: “That an independently wealthy man with his celebrity and political power is to raise legal fees through a crowdfunder for a case ultimately linked to sexual harassment is unbelievable.
“It suggests that he is sending a signal to those who have made allegations that he has the upper hand.
“Decent people will rightly be furious that he is to raise money to take the Scottish Government to court. Alex Salmond is abusing his power, and dragging Scotland into the gutter.”
In a statement following the resignation, Salmond’s successor as first minister Nicola Sturgeon said she felt a “huge sadness” about the whole situation.
Sturgeon, who has been under intense pressure to suspend him while Police Scotland review the case, said the last few days had been “incredibly difficult” for the SNP.
She added that complaints must be investigated “without fear or favour, regardless of the seniority of the person involved”.
A spokesman for the Scottish Conservatives said: “Alex Salmond has taken the decision to resign his membership of the SNP, but he has some brass neck to publicly crowdfund in the same breath.
“There is something deeply unsettling about an independently wealthy man asking ordinary people for money so he can take the government of Scotland to court for investigating allegations of sexual harassment against staff.
“Invoking his support for independence while he does so seems crass in the extreme.
“We now have the spectacle of Scotland’s longest serving first minister plunging the government he used to lead into chaos. And, in all Alex Salmond’s posturing, we have a right to ask - what has happened to the voices of those women who’ve brought serious complaints?”
Salmond has twice been leader of the SNP and led the devolved Scottish government as first minister from 2007. He resigned after Scotland voted to remain in the UK in the independence referendum in 2014.