The interim chief executive of the SNP said there is “a tremendous mess” in the party amid staff resignations and a row over membership numbers in the last few days.
SNP president Mike Russell, who has stepped in temporarily to replace outgoing Peter Murrell, said the party needs to start off in “an entirely reset position” once a new leader is voted in.
He said, despite the mess, voting for the next party leader must go ahead to “rebuild the trust of Scotland”.
Mr Murrell, who is Nicola Sturgeon’s husband, quit with immediate effect on Saturday following a row over the party’s membership numbers.
His departure came shortly after that of media chief Murray Foote, who said there had been a “serious impediment” to his role.
Mr Murrell said he took responsibility after misleading information was briefed to the media over membership numbers, but said there was no “intent to mislead”.
The party this week confirmed there had been a big drop in membership numbers.
And last week, two of the SNP leader candidates to succeed Ms Sturgeon as first minister: Kate Forbes and Ash Regan, questioned the independence of the election process.
Speaking on BBC Scotland’s The Sunday Show, Mr Russell said things had gone “spectacularly wrong in recent weeks” for the SNP.
He said: “I think it is fair to say there is a tremendous mess and we have to clear it up, and that’s the task I’m trying to take on in the short term.”
He insisted social media had a part to play in SNP staff coming “under the most tremendous pressure and scrutiny”.
“Some of the social media stuff has been absolutely disgraceful,” he said.
“Members of our staff have been appallingly abused.
“I think that’s part of having a contest in the social media age, which we’ve not had before, and I think we need to learn that lesson.”
Mr Russell said the next important step for the party is to have “a fair electoral process that produces a clear accepted outcome.
“We have got to have this concluded in the next eight days and then – the new leader has to look at the party and say let’s rebuild this and let’s rebuild the trust of Scotland.
“This has not been an edifying process. There hasn’t been a contested leadership in the SNP for 19 years, and it shows.”
He said a new leader in place will provide “a tremendous opportunity to get things right and to start off with an entirely reset position.”
On Sunday, leadership candidate Ms Forbes said decisions in the SNP are being taken by too few people.
Ms Forbes, who is on maternity leave from her Government role as Finance Secretary, is facing Health Secretary Humza Yousaf and former community safety minister Ash Regan in the contest.
She told the BBC’s Laura Kuenssberg: “I think at the heart of this is the fact that the decisions within the SNP have been taken by too few people.
“I think that’s well recognised across the political domain.
“SNP members want to know that our institution is democratic, that they can influence it, that they can shape policy.”
Ms Forbes also said the SNP needs to improve its ability to listen and deliver.
She highlighted the failure to turn the A9 road into a full dual-carriageway, as the party has long-promised.
Referring to the trunk road as Scotland’s “backbone”, she said: “We said we would dual that, we haven’t done it. We need to be able to deliver.”
She also said she would rule out further tax rises if she becomes first minister.
Ms Forbes said there has been “quite a stunning level of scrutiny and perhaps backlash from some quarters” around her religious views.
She said other people of faith have held high office in the UK and she vowed to ensure Scotland is a “tolerant and pluralistic nation”.
In another interview with Sky’s Sophy Ridge On Sunday show, which was recorded before Mr Murrell’s resignation, she said she had confidence in the integrity of the election process.
In response to Ms Forbes’ Sunday interviews, Scottish Conservative chairman Craig Hoy said: “Kate Forbes is at it again – claiming she is the ‘change candidate’ to put right the failings of the SNP Government, despite having been one of the most senior members of it.
“She had some brass neck publicly lamenting the SNP’s failure to dual the A9, as if she was a helpless bystander.
“As a Highlands MSP, she ought to have been banging the drum for this since 2016; while, as finance secretary for the last three years, she’s been in charge of the purse strings and could have made this happen if it was that important to her.
“Similarly, she talks of the need to keep taxes down, while blithely ignoring the fact that she’s made Scotland the highest taxed part of the UK.”
Mr Hoy went on to describe Mr Russell as “the most slapdash, disinterested and hands-off party president ever”.
He said the “squalid leadership race has exposed a civil war within the SNP”.
“It’s a measure of just how bad things have become when a senior party loyalist like Mike Russell describes it as a tremendous mess and admits things have gone spectacularly wrong,” Mr Hoy continued.
The leadership contest is due to conclude on March 27.