South African President Jacob Zuma survived an attempt to oust him from office after a "robust" and "difficult" debate within the ruling ANC party, an official said Tuesday.
Zuma has been weakened by corruption allegations, but his supporters were taken by surprise at the bid to unseat him at a weekend meeting of the African National Congress's executive committee.
The rebellion, led by at least four ministers, was the most serious threat to Zuma's hold on power since he became president in 2009.
It also shook the ANC party, which has ruled since the end of apartheid in 1994 but recently suffered a sharp setback in local elections.
"Following robust, honest, candid and at times difficult discussions, the (ANC executive committee) did not support the call for the president to step down," Gwede Mantashe, the ANC secretary general, told reporters.
"All members of the (executive committee) had an opportunity to raise, in the meeting, the issues they feel are hurting the movement and the country."
Local media said the meeting -- which was extended into Monday -- was tense, with tempers flaring and some ministers threatening to resign if Zuma stayed.
But the president launched a fierce defence of his position, and his loyalists eventually headed off the attempt to oust him.
"The president told us that he will never step down, as it would be like handing himself over to the enemy, and that there are people who want to see him in jail," an unnamed source at the closed-door meeting told the News24 website.
Zuma left South Africa early on Tuesday to attend the funeral of Cuban leader Fidel Castro.
The president has been hit by multiple corruption scandals and damaging court rulings this year, while the ANC performed poorly in local polls in August and unemployment has hit a 13-year high.
Zuma has been under renewed pressure since a graft probe earlier this month unearthed fresh allegations of misconduct.
The probe by the country's top watchdog uncovered evidence of possible criminal activity in his relationship with the Guptas, a business family accused of wielding undue political influence.
However Zuma, 74, retains strong loyalty among many rank-and-file ANC party members, as well as its lawmakers.
He easily survived a vote of no confidence in parliament on November 10.
"Zuma will only leave when the patronage faction around him decide it is time," Peter Montalto, analyst from Nomura bank, said in a briefing note.
"The ANC may well be tired of Zuma but it's not clear it is ready to conclude anything on succession yet."
Zuma is due to stand down in 2019 after serving the maximum two terms.