Cape Town (AFP) - South African President Jacob Zuma on Tuesday survived a parliamentary vote of no confidence, with enough ANC lawmakers sticking by their leader despite divisions and fierce criticism of his rule.
The motion brought by the opposition needed to secure 201 of the 400 votes in parliament to succeed, but fell short with 177 votes, national assembly Speaker Baleka Mbete announced.
If Zuma had lost, he would have been forced to resign along with his entire cabinet.
Criticism of Zuma from within the African National Congress (ANC) has grown amid multiple corruption scandals and South Africa's mounting economic woes, while the celebrated party of Nelson Mandela has declined sharply at the polls.
But ANC officials and analysts had predicted the president would survive the vote given the party's large parliamentary majority.
"The party will spin this as a win, but it's a weak victory," independent analyst Daniel Silke told AFP, after at least 30 of the 249 ANC lawmakers voted to oust the president.
"There are marked signs of a rebellion within the ANC. It will perpetuate the factional infighting after a relatively close vote. There was a relatively substantial mutiny," Silke said.
The ANC parliamentary party celebrated victory over what it described as an attempted "soft coup".
"It has been the publicly stated intention of the opposition... to sow seeds of chaos in society to ultimately grab power," it said in a statement.
Several opposition parties led thousands of anti-Zuma protesters outside the national assembly before the vote, while supporters of the president held a rival march.
Zuma, who has built up a network of loyalists in the ANC since coming to power in 2009, has survived several previous parliamentary votes but these had been held without secret balloting.
"Today's motion of no confidence result is closer than anyone expected," Mmusi Maimane, leader of the main opposition Democratic Alliance party said, hailing "brave" ANC lawmakers who voted against Zuma.
"Jacob Zuma is the manifestation of what the ANC has become -- a toxic mix of corruption, cronyism and nepotism."
- ANC loses its lustre -
Mbete, the speaker of parliament, made a surprise decision Monday to hold the ballot in secret after a campaign by the opposition who hoped to encourage ANC members to vote against their leader without fear of intimidation.
Zuma, 75, is due to step down as head of the ANC in December, and as president before the 2019 general election -- lessening pressure for his party to trigger imminent change.
The ANC has acknowledged recent criticism of the party, including the impact of a cabinet reshuffle in March when respected finance minister Pravin Gordhan was replaced with a close Zuma ally.
Gordhan's sacking led to a string of downgrades to South Africa's credit rating as well as causing the rand currency to tumble.
Public support for the ANC, which swept to power under Mandela in the first non-racial elections in 1994, slipped to 55 percent in last year's local polls -- its worst-ever result.
A handful of MPs, including Gordhan, have publicly joined calls from anti-apartheid veterans and trade unions for Zuma to resign, as South Africa endures record unemployment and a recession.
Zuma has been engulfed by corruption allegations while in office.
A court last year found him guilty of violating the constitution after he refused to repay taxpayers' money used to refurbish his private rural house.
He has been accused of being in the sway of the Gupta business family, allegedly granting them influence over government appointments, contracts and state-owned businesses.
He is also fighting a court order that could reinstate almost 800 corruption charges against him over a multi-billion dollar arms deal in the 1990s.
Zuma is seen as favouring his ex-wife, former African Union chief Nkosazana Dlamini-Zuma, to succeed him ahead of Deputy President Cyril Ramaphosa.