The power struggle over Jacob Zuma's departure put the president at loggerheads with Cyril Ramaphosa, his expected successor, who is the head of the ruling African National Congress party.
South Africa's ruling African National Congress on Tuesday announced that it had recalled President Jacob Zuma and that the party wanted its leader Cyril Ramaphosa to become president of the country as soon as possible.
The announcement was made in Johannesburg by ANC secretary general Ace Magashule at the party's headquarters, who said that the decision by the 86-member national executive committee (NEC) had been communicated to Zuma.
Magashule said that Zuma had wanted a grace period of between three and six months to step down as president of the country.
TRT World's Lynsey Chutel has more.
"The president had agreed in principle to resign and had proposed time frames extending from three to six months and while appreciating President Zuma's proposal, the national executive noted that South Africa is going through a period of uncertainty and anxiety as a result of the unresolved matter of transition."
But Magashule said there was no date for Zuma to stand down, and added that there would be "continuing interaction" between party officials and Zuma.
"In its wisdom, the NEC decided... to recall its deployee Jacob Zuma," he said.
"The decision by the NEC to recall its deployee was taken only after exhaustive discussion on the impact such a recall would have on the country."
The NEC met for 13 hours at a hotel outside Pretoria, and decided in the early hours of Tuesday to "recall" Zuma from his post.
The party's deputy general secretary Jessie Duarte said, speaking after the press conference, that that the recall took effect immediately.
Ramaphosa and Magashule, had personally delivered a request for Zuma to resign to the president's official residence in Pretoria at about midnight.
But Zuma "was very arrogant. He told them he was not going anywhere as he did nothing wrong," an unnamed ANC committee member told the Mail and Guardian newspaper.
"He told them if the ANC issued a statement on its decision to recall him, he will retaliate."
Another source told the Times Live website that Ramaphosa had pleaded with Zuma to leave office, but Zuma had responded "in no uncertain terms" that he would not resign.
The ANC can "recall" the head of state, essentially forcing him to resign, but the process is a party-level instruction and he is under no constitutional obligation to obey.
If he refuses, Zuma would then likely be ousted via a parliamentary vote of no-confidence within days.
However, Magashule said that the ANC had not discussed bringing any no-confidence motion in parliament.
Ramaphosa, the de-facto president-in-waiting, has been in deadlocked negotiations with Zuma, who dismissed an earlier request from party leaders to resign more than a week ago.
The stalemate plunged South Africa - Africa's most developed economy - into uncertainty over who is running the country, with a series of public events cancelled last week including the annual State of the Nation address to parliament.
South African opposition parties have called for early elections as the ANC's leadership battle grinds on.
An opposition request for a no-confidence vote against Zuma, 75, this week was still being considered by the parliamentary Speaker.
Early election call
On Monday, South African opposition parties called for early elections.
"We must proceed to the dissolution of parliament... subsequent to that, we move on to an early election," Democratic Alliance (DA) party leader Mmusi Maimane told reporters, speaking alongside several opposition party leaders in Cape Town.
Julius Malema, of the radical Economic Freedom Fighters party, said the extended deadlock was a political crisis for the country and called for an immediate parliamentary vote of no confidence to oust Zuma.
"Once we remove Zuma, parliament must be dissolved," he said.
Zuma has not spoken publicly since being asked to resign by senior ANC officials on February 4.
The rand, which has tended to strengthen on signs that Zuma could step down early, was volatile on Monday as the political drama unfolded.
Zuma's presidency has been marred by corruption scandals, slow economic growth and record unemployment that have fuelled public anger.
He was scheduled to stand down next year after serving the maximum two terms after coming to power in 2009.
"I think Jacob Zuma is almost daring the ANC to remove him through a motion of no confidence because he knows that would be damaging for unity in the party," analyst Abdul Waheed Patel told AFP.
In 2008, Zuma's supporters pushed out then-president Thabo Mbeki over allegations of abuse of power.
In local polls in 2016, the ANC recorded its worst electoral performance since coming to power with Mandela at the helm in 1994 when white-minority rule fell.
The party faces a tricky general election next year.
Ramaphosa is a former trade unionist and Mandela ally who led talks to end apartheid rule in the early 1990s and then became a multi-millionaire businessman before returning to politics.
Zuma's hold over the ANC was shaken in December when his chosen successor - his former wife Nkosazana Dlamini-Zuma - narrowly lost to Ramaphosa in a vote to be the new party leader.
The ANC has insisted there will be no delay to the budget speech, which is due on February 21.