By Jonah Fisher
BBC News, Johannesburg
Thabo Mbeki has been left with few friends in the upper ranks of the ANC
Thabo Mbeki was left with a simple choice. Resign or face the full force of a party that no longer wanted him.
That the African National Congress (ANC) had seen enough was made clear at a news conference on the outskirts of Johannesburg.
Throughout Friday and into the early hours of Saturday the 86 members of the ANC's National Executive Committee debated Mr Mbeki's fate.
In the end there was no need for a vote.
It fell to Gwede Mantashe, the party's secretary general, to announce the news that South Africa's newspapers had already widely reported.
He told a packed news conference that the decision had been taken to "recall" the president. A polite way of saying that they had told Mr Mbeki to resign.
Forty minutes later a brief statement from the president's office confirmed the inevitable. Thabo Mbeki would step down "after all constitutional requirements have been met".
Over the last week Mr Mbeki's already strained relations with his own party hit a new and, as it turned out, irreversible low.
He had been criticised as aloof and out of touch and the court case involving his bitter rival Jacob Zuma gave his opponents the ammunition they needed to land a fatal blow.
Dismissing all 16 corruption charges, Judge Nicholson said he believed there may have been political interference in the decision to prosecute Mr Zuma.
If the Zuma case had been abandoned at that point, Mr Mbeki might just have survived to see out his presidency.
But when prosecutors decided on Thursday to appeal against the verdicts, positions appeared to crystallize.
Jacob Zuma will wait for a general election before running for president
"The political elite within the ANC then felt that the Jacob Zuma trial would never go away while Thabo Mbeki was in office," Adam Habib, a political analyst from the University of Johannesburg, told the BBC.
"That was the critical decision."
Thabo Mbeki's demise can be traced back to the ANC's congress at Polokwane last December.
Up against the controversial but charismatic figure of Jacob Zuma for the position of ANC president, his defeat at the time now looks like the beginning of the end.
In the months that followed, Mr Zuma's supporters have replaced Mr Mbeki's men throughout the ANC. It left Mr Mbeki isolated and emasculated.
"They've wanted to get rid of Thabo Mbeki since Polokwane," Professor Sheila Meintjes from the University of Witwatersrand said.
"But I don't think the ANC really considered the interest of South Africa or the region sufficiently while making this decision."
Zimbabwe's already fragile power-sharing agreement has lost both its architect and driving force.
The ANC says it is keen for Mr Mbeki to continue with his mediation role, but without the badge of office his influence and political clout will be much diminished.
In announcing their decision to "recall" Mr Mbeki, the ANC stressed their wish to restore stability to the party.
By delaying his resignation Mr Mbeki appears willing to try and smooth any transition.
"The ANC want to politically manage this," Mr Habib said. "Whether Thabo Mbeki is going to go quietly is the big question."
When Mr Mbeki does officially tender his resignation, parliament will be recalled to elect his successor.
That new president will then complete Mr Mbeki's term in office until an election expected in April next year.
Jacob Zuma is the ANC's chosen candidate for the election but is unlikely to take over now.
The new president must be a member of parliament, which Mr Zuma is not, and it is thought that he would prefer to wait for an election and the popular mandate he is almost certain to receive.