WATCH: Alex Salmond quits SNP with plea for cash to help fund legal case over sex allegations
Alex Salmond has quit the SNP following allegations of sexual harassment while he was Scotland's first minister.
He said he wanted to avoid causing a split in the party he used to lead amid calls by Labour and the Consnervatives for him to be suspended.
But he insisted he would reapply for membership "as soon as I have had the opportunity to clear my name".
Mr Salmond also revealed he had launched a bid to crowdfund his legal case challenging the way the Scottish government investigations the allegations against him, which he denies.
It emerged last week that the former SNP leader had been reported to police over claims he sexually assaulted two former staff members at his then-official residence of Bute House in 2013.
In a video posted on YouTube, a grim-faced Mr 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."
On opposition calls for him to be suspended, he said: "I did not come into politics to facilitate opposition attacks on the SNP and with Parliament returning next week, I have tendered resignation to remove this line of opposition attack.
"Most of all I am conscious that if the party felt forced to suspend me, it would cause substantial internal division."
A judicial review of the Scottish government's handling of the case will take place at the Court of Session in Edinburgh and Mr Salmond said the costs were "huge".
He said: "Many have asked how they can help directly. Therefore I have established a crowd funder to assist costs."
The former MP said any money left over at the end of the case would be donated to good causes.
Watch the full statement here:
Rhoda Grant, women's spokesperson for Scottish Labour, accused Mr Salmond of "dragging Scotland into the gutter".
She said: "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."