By Wendell Roelf and TJ Strydom
CAPE TOWN (Reuters) - South African President Jacob Zuma survived an attempt in parliament to force him from office on Tuesday, but was left politically wounded after some members of his ruling African National Congress (ANC) party voted with the opposition.
The 75-year-old Zuma, in power since 2009, secured 198 votes to the opposition's 177 in a no-confidence motion held by secret ballot as loyal ANC lawmakers rallied to his support. There were nine abstentions.
ANC lawmakers erupted into singing and dancing in parliament even before the speaker of the house announced the result of the vote in favor of Zuma, whose eight years in office have been dogged by allegations of corruption.
"They are pumping propaganda through the media that the ANC is no longer supported by the people. It is their own imagination," an exuberant Zuma told a cheering crowd outside parliament in Cape Town after the result was announced.
"The ANC is supported by the overwhelming majority," he said, before breaking boisterously into song, cracking jokes and telling his supporters that the opposition had been thwarted in an attempted power grab.
South Africa's rand weakened nearly 1.5 percent immediately after the news of Zuma's victory. At 1730 GMT the rand was down 1.4 percent at 13.4050 per dollar, having traded as firm as 13.1525 during the session.
Zuma, who has held power in Africa's most industrialized economy since 2009, has now survived nine no-confidence votes despite a record in office marred by allegations of sleaze and influence-peddling.
He had particularly upset investors by removing finance minister Pravin Gordhan in March, which hit the country's credit rating.
That has been downgraded to junk by two of the top three rating agencies, unemployment is at a 14-year high of 27.7 percent and the economy is back in recession.
Had the vote gone against him on Tuesday, he and his entire cabinet would have had to step down.
The speaker of parliament, Baleka Mbete, had earlier ruled that the vote - unlike other no-confidence votes Zuma has faced - should be by secret ballot, a decision the opposition hoped would embolden ANC members unhappy with Zuma to vote against him.
The ANC holds 249 seats in the 400-seat parliament and the opposition controls 151, so it required 50 ANC lawmakers backing the opposition to vote Zuma and his cabinet out.
The figures however showed that the ANC, which has ruled South Africa since the end of apartheid in 1994, is divided over Zuma and the ANC leadership said it would study the numbers of those who had voted with the opposition or had abstained.
"Less than 20, but be that as it may we will still look at the numbers," ANC's chief whip Jackson Mthembu said when asked how many of the party's lawmakers had voted to remove Zuma.
"We will look at what is this thing that has made certain members of the ANC to be a little bit hesitant to defend their party when it is under attack."
The numbers were seized on by the opposition as proof that ANC support for Zuma was crumbling.
Leader of the main opposition Democratic Alliance (DA), Mmusi Maimane, said the result revealed an ANC that was "totally divided against itself".
Julius Malema, leader of the leftist Economic Freedom Fighters (EFF), said that 26 ANC members had voted with the opposition and nine abstained.
Reuters could not verify the voting patterns as the exercise was carried out by secret ballot.
If the motion had been successful, Zuma, whose term is due to run until 2019, would have been removed as president. Zuma will now be at the helm of the ANC until December, when he is due to step down and a new leader elected in his place.
Before the vote, the ANC lawmakers held a meeting attended by Zuma, and Mthembu said the party had resolved to support him.
On the streets, before the vote, protesters blocked roads with burning tires and rocks in the commercial hub Johannesburg and capital Pretoria, temporarily blocking traffic.
In Cape Town, where parliament sits, thousands of opposition supporters rallied during the vote while ANC members there came out too in support of Zuma.
"The suggestion is still one of a deeply divided ANC, and the focus now falls on the December 2017 elective conference of the party to see if this split can be healed," said Razia Khan, chief economist Africa at Standard Chartered Bank.
"I'm not surprised at the outcome. The ANC chose the lesser of the two evils. They saw that it was going to do the least damage to the party to keep Zuma," said Gary van Staden, political analyst with NKC independent economists.
"The party rallied behind itself. This doesn't suggest that the ANC believes JZ is their best leader," he said of Zuma.
For a graphic on seats in parliament, click: http://tmsnrt.rs/2hFvn5h
(Additional reporting by James Macharia, Tiisetso Motsoeneng, Zandi Shabalala, Nqobile Dludla and Tanisha Heiberg in Johannesburg; Writing by James Macharia; Editing by Richard Balmforth)