Alex Salmond has resigned from the SNP after two people accused Scotland’s former first minister of sexually harassing them.
The 63-year-old said he “refutes” the complaints and “absolutely rejects” any suggestion of criminality.
He said he was stepping down after 45 years of service to protect the party from being attacked by the opposition over the matter before Parliament returns next week and to prevent any “internal division” if he was suspended over the matter.
In a Twitter post, he said: “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.
“It urgently needs to be established who breached that duty of confidence and why.”
He said it is “obvious” that current SNP leader Nicola Sturgeon is “under pressure” from other political parties to suspend him, “given recent party precedents”.
Mr Salmond added that he has “always thought it a very poor idea to suspend any party member on the basis of complaints and allegations” as the UK abides by the concept of innocent until proven guilty.
He said: “However, I did not come into politics to facilitate opposition attacks on the SNP and, with Parliament returning next week, I have tendered my resignation to remove this line of opposition attack.
“Most of all I am conscious that if the Party felt forced into suspending me it would cause substantial internal division.”
Mr Salmond said that “apart from a political spat back in the 1980s” he has been a member of the SNP continuously for 45 years, 20 of them as leader and seven as First Minister of Scotland.
“I hope I have done the party and the broader cause of independence some service,” he said.
“I truly love the SNP and the wider independence movement in Scotland. They have been the defining commitment of my life.”