* Ramaphosa replaces scandal-plagued Zuma as president
* Convinced Zuma to quit after weeks of tense talks
* Played important role in talks to end apartheid
* Ramaphosa has vowed to tackle corruption, fix economy
By Alexander Winning
JOHANNESBURG, Feb 15 (Reuters) - After weeks of tortuous discussions to convince scandal-plagued Jacob Zuma to step down as head of state, South Africa's great negotiator, Cyril Ramaphosa, has fulfilled his long-held ambition to lead the country.
Deputy president since 2014, Ramaphosa has been the country's dominant politician since he replaced Zuma as leader of the ruling African National Congress in December.
But he had to strike a fine balance between applying pressure on Zuma, a 75-year-old anti-apartheid veteran, and affording him a dignified exit.
Facing waning electoral support for his party, Ramaphosa needed to avoid alienating ANC members still loyal to Zuma despite the economic stagnation and sleaze allegations that tainted his nine years in power.
Ramaphosa, 65, used the same painstaking negotiating strategy he employed in talks to end white minority rule, when he negotiated on behalf of the ANC. He ignored frustration from some sections of the media and opposition parties who have been howling for Zuma to go for years.
Ramaphosa's dealmaking skills have been apparent for decades.
Nelson Mandela turned to the former trade union leader when he needed a tenacious negotiator to lead talks to end apartheid. The successful conclusion of those talks paved the way for Mandela to sweep to power in 1994 as head of the victorious ANC after South Africa's first democratic vote.
Mandela wanted Ramaphosa to be his heir but was pressured into picking Thabo Mbeki by a group of ANC leaders who had fought apartheid from exile.
It has taken more than two decades for Ramaphosa to get another chance to run the country.
"Ramaphosa's ambition for the presidency has been clear through his whole adult life. He was quite clearly wounded by his marginalisation in the Mbeki period," said Anthony Butler, a politics professor who has written a biography of Ramaphosa.
Ramaphosa faces a major challenge in turning the country round. But his pledges to boost growth and fight corruption have gone down well with foreign investors and ANC members who thought Zuma's handling of the economy could cost the party dearly in a parliamentary election next year.
Financial markets have seen a "Ramaphosa rally" since he defeated Zuma's preferred successor and ex-wife Nkosazana Dlamini-Zuma in last year's ANC leadership contest.
Unlike Zuma, Ramaphosa was not driven into exile for opposing apartheid, which some of the party's more hardline members hold against him.
He fought the injustices of white minority rule from within South Africa, most prominently by defending the rights of black miners as leader of the National Union of Mineworkers.
A member of the relatively small Venda ethnic group, Ramaphosa was able to overcome divisions that sometimes constrain members of the larger Zulu and Xhosa groups.
A massive miners' strike led by Ramaphosa's NUM in 1987 taught business that "Cyril was a force to be reckoned with," said Michael Spicer, a former executive at Anglo American.
"He has a shrewd understanding of men and power and knows how to get what he wants from a situation," Spicer said.
The importance of Ramaphosa's contribution to the talks to end apartheid is such that commentators have referred to them in two distinct stages: BC and AC, Before Cyril and After Cyril.
Ramaphosa also played an important role in drafting South Africa's post-apartheid constitution.
After missing out on becoming Mandela's deputy, Ramaphosa withdrew from active political life, switching to business.
His investment vehicle Shanduka - Venda for "change" - grew rapidly and acquired stakes in mining firms, mobile phone operator MTN and McDonald's South African franchise.
Phuti Mahanyele, a former chief executive at Shanduka, recalled that Ramaphosa required staff to contribute to charitable projects aimed at improving access to education for the underprivileged.
By the time Ramaphosa sold out of Shanduka in 2014, the firm was worth more than 8 billion rand (now $685 million), making him one of South Africa's 20 richest people.
To his supporters, Ramaphosa's business success equips him for the task of turning around an economy grappling with 28 percent unemployment and credit rating downgrades.
Pravin Gordhan, a respected former finance minister, told Reuters that Ramaphosa's election as ANC leader was enough to change "the whole narrative about South Africa's economy" within three months.
But Ramaphosa has his detractors too.
He was a non-executive director at Lonmin when negotiations to halt a violent wildcat strike at its Marikana platinum mine in 2012 ended in police shooting 34 strikers dead.
An inquiry subsequently absolved Ramaphosa of guilt. But some families of the victims still blame him for urging the authorities to intervene.
"My conscience is that I participated in trying to stop further deaths from happening," Ramaphosa said of the incident.
Others have warned Ramaphosa that he should not take their support for granted.
"Cyril has got to be wiser than President Zuma," said Sdumo Dlamini, president of South African trade union federation COSATU and a member of the ANC's national executive.
"He leads as part of a collective, and we need to see a serious turnaround to address the challenges of joblessness and inequality, which are huge."
Reporting by Alexander Winning; editing by Giles Elgood