Mutinous SNP MPs have forced Ian Blackford to quit as the party's Westminster leader in a major challenge to Nicola Sturgeon's authority and independence strategy.
Mr Blackford, a loyal ally of the First Minister, announced that he would not restand for the post at the SNP Westminster group's annual general meeting next Tuesday.
Although he denied being forced out, SNP insiders said he had to resign after it emerged Stephen Flynn, the Aberdeen South MP, had the necessary support among the party's 44 MPs to oust him.
Joanna Cherry, the SNP's Edinburgh South West MP, welcomed Mr Blackford's departure and warned Ms Sturgeon it must be left to the Westminster group to choose his successor.
The First Minister stepped in to save Mr Blackford from an abortive coup a fortnight ago, with sources saying that Mr Flynn was urged not to rock the boat ahead of the Supreme Court ruling on an independence referendum.
But, in a sign of Ms Sturgeon's diminishing authority since the court ruled against her, Mr Flynn decided to move again against Mr Blackford. He is the clear favourite to be appointed the new Westminster leader next week.
An SNP MP who intends to back Mr Flynn said: "Stephen coming back this quickly from a slap-down would not have happened six months ago. The fact that this is happening shows that her [Sturgeon's] position has weakened."
His supporters said they believed Mr Flynn would stand up to the First Minister, in a way that Mr Blackford was either unwilling or unable to do, and give MPs more influence over party policy and strategy.
Some SNP MPs are deeply unhappy with Ms Sturgeon's plan to use the next general election as a “de facto” independence referendum, fearing it damages their chances of holding their seats.
They warned it will motivate Unionist voters to turn out and cast their ballots tactically for the Tories in some seats, while others face a renewed challenge from a resurgent Labour Party.
However, this was only one factor behind Mr Blackford's departure, with cliques in the deeply divided SNP group unhappy with his performance for a variety of reasons.
In a statement, Mr Blackford said: "I have [on Thursday] informed SNP MPs that I will not be restanding as leader of the Westminster parliamentary group at our AGM next week.
"After more than five years in the role, now is the right time for fresh leadership at Westminster as we head towards a general election and the next steps in winning Scotland’s independence."
New role for Blackford
He said he would continue as Ross, Skye and Lochaber MP and had accepted from Ms Sturgeon "a new role at the centre of the SNP’s independence campaign, leading on business engagement".
Mr Blackford later insisted that he had not been forced out, saying that Ms Sturgeon had given him the option of trying to continue.
But his departure came only a week after he gave a newspaper interview in which he predicted he would be the last SNP Westminster leader before Scotland left the UK.
Denying there was a coup, Ms Sturgeon said: "Ian has been Westminster group leader for five years now and he represents one of the furthest flung constituencies in the country.
"He's making the decision given all that lies ahead for the SNP, given all the exciting work that lies ahead for the SNP, that this is the right decision for him to pass on the baton."
Responding to Mr Blackford's departure, Ms Cherry tweeted: "I’m pleased to hear this. It’s time for fresh leadership & tolerance of debate & diverse viewpoints.
"I hope the SNP Westminster group will now be left to choose our new leader without outside interference & in accordance with our standing orders."
Ian Murray, Labour's Shadow Scottish Secretary, said: "The SNP is in total disarray – the [nationalists] are deserting the sinking ship. Nationalist MPs know Nicola Sturgeon’s plan for a de facto referendum is finished before it’s even started and are worried about Labour gaining seats."
Craig Hoy, the Scottish Tory chairman, said: "Ian Blackford has jumped before he was pushed. His resignation is a total humiliation for Nicola Sturgeon."