By Alexander Winning and James Macharia
JOHANNESBURG (Reuters) - South African Deputy President Cyril Ramaphosa was elected leader of the African National Congress on Monday in a close-run vote that will set the direction for the country and the scandal-plagued party that has ruled since the end of apartheid.
As ANC leader, Ramaphosa, a 65-year-old union leader who became a businessman and is now one of South Africa's richest people, is likely to become the country's next president after elections in 2019.
He has promised to fight rampant corruption and revitalise the economy, a message hailed by foreign investors.
Jacob Zuma's presidency, tainted by corruption and scandal, has badly tarnished the ANC's image both at home and abroad. The party once led by Nelson Mandela is now deeply divided.
Ramaphosa narrowly beat Nkosazana Dlamini-Zuma, 68, a former cabinet minister and Zuma's ex-wife, in Monday's vote, marking a pivotal moment for the ANC, which launched black-majority rule under Mandela's leadership 23 years ago.
He smiled and hugged other party officials as the results were read out. Zuma sat stoney-faced as Ramaphosa's victory was announced.
Political instability, including questions over who would replace Zuma, has been cited by credit rating agencies as a big factor behind their decision to cut South Africa to "junk".
Economic growth in Africa's traditional powerhouse has been lethargic over the last six years and the jobless rate stands near record levels.
Zuma has faced allegations of corruption since he became head of state in 2009 but has denied any wrongdoing. The president has also faced allegations that his friends, the wealthy Gupta businessmen, wielded undue influence over his government.
Zuma and the Guptas have denied the accusations.
The 75-year-old president has survived several votes of no-confidence in parliament over his performance as head of state.
Dlamini-Zuma, 68, the president's preferred candidate, had campaigned on pledges to tackle the racial inequality that has persisted since the end of white-minority rule.
The rand currency had risen to a nine-month high of 12.5200 earlier, as the market priced in a Ramaphosa victory. Government bonds also closed firmer before the announcement that Ramaphosa had won the race.
"Ramaphosa was seen as the more investor-friendly of the two main candidates vying to lead the ruling party," Capital Economics Africa economist John Ashbourne said.
"During the campaign, he promised to clean up corruption within the ruling party and to work with businesses and labour to boost economic growth."
In a boost to Ramaphosa, courts ruled last week that officials from some provinces seen as supporting Dlamini-Zuma had been elected illegally and were barred from the conference.
Ramaphosa drew the majority of nominations from party branches scattered across the country. But the delegates are not bound by their branches when they vote at the conference.
Mmusi Maimane, the opposition leader, said in a statement: "Ramaphosa cannot save South Africa, only the voters can in 2019," in reference to the upcoming national elections.
"TOP SIX" SPLIT
Analysts say the bitterness of the power struggle between Ramaphosa and Dlamini-Zuma has increased the chances that the party will find it hard to set policy and could possibly split before the 2019 national election.
After his victory, Ramaphosa will be ANC's flag-bearer in that election, but will have to contend with Dlamini-Zuma's allies in his leadership team, meaning that their policies are divergent.
Dlamini-Zuma is a fierce campaigner against racial inequality whose hostility to big business has rattled investors in South Africa. Backers of Ramaphosa, say she is peddling populist rhetoric and would rule in the mould of her former husband.
To his supporters, Ramaphosa's business success makes him well-suited to the task of turning around an economy grappling with 28 percent unemployment and credit rating downgrades.
Prince Mashele, senior research fellow at University of Pretoria, said the ANC's top most decision-making group known as the "top six" was now split down the middle, consisting of three politicians apiece drawn from Ramaphosa and Dlamini-Zuma's camps, which would make it hard to implement policy.
"Terrible combination we have in the top six, it's a paralyzed situation. This top six will not make any ground breaking decisions," Mashele, who is also a political commentator and columnist, said.
Daniel Silke, an independent political analyst, said: "Both sides will continue to vie for ascendancy within the ANC."
(This version of the story was refiled to cut extraneous words in paragraph 9, 13, 19, 21)
(Additional reporting by Nqobile Dludla, Mfuneko Toyana, Olivia Kumwenda-Mtambo, Ed Stoddard, Zandi Shabalala and Tanisha Heiberg; Writing by James Macharia)