Amid chaotic scenes in Johannesburg on Monday evening, Cyril Ramaphosa was elected president of the African National Congress (ANC) by a margin of 179 votes over Nkosazana Dlamini-Zuma, the former wife of the South African president President Jacob Zuma.
The announcement of the result was delayed by a recount of votes after a delegate supporting Mrs Dlamini-Zuma was said to have lodged an objection.
The decision by the ANC electorate means that Mr Ramaphosa will stand as the party's candidate at the next general election in 2019 and may even move to replace Mr Zuma before that poll.
With 4,708 votes cast, Mr Ramaphosa took 51.8% of the vote against 48.2% for his opponent.
“We declare comrade Cyril Ramaphosa the new president of the African National Congress,” an election official told party delegates. Thousands of raucous Ramaphosa supporters sang and chanted in the conference hall as backers of the defeated candidate sat silent and stony-faced.
The election took place against a backdrop of a bruising race that exposed deep rifts within the organisation that led the struggle against apartheid.
Mr Ramaphosa, the nation’s deputy leader and one of its wealthiest black people, had pledged to revive the struggling economy and stamp out corruption. He was the favoured candidate of investors, business leaders, labour unionists and the ANC’s communist party allies.
His opponent echoed her former husband’s call for “radical economic transformation” to redistribute wealth to the black majority, a move that had filled the business community in the country with dread.
Following the news of his election, the rand extended gains to climb 4% against the dollar, the biggest jump in two years to its strongest level since March.
The outgoing president’s second and final term as party leader has been a scandal-ridden tenure that has seen the popularity of the late Nelson Mandela’s liberation movement plummet.
Despite being part of Zuma’s administration, the 65-year-old Mr Ramaphosa has promoted himself recently as a reformer who will steer South Africa away from the scandals that have bedevilled the ANC.
Voters may see the transfer of power as a break with the Zuma era, and it should boost the ANC’s chances or retaining an overall majority in the 2019 elections.
Support for the party fell to an all-time low of 54 percent in last year’s municipal elections, and it relinquished control of economic hub Johannesburg and Pretoria, the capital, to opposition coalitions.
Mr Ramaphosa is a veteran of the struggle to end the country's former apartheid system of white minority rule and was one of the key figures in the negotiations that saw the transition of South Africa to democracy.
He turned his connections as a former union leader into business ventures that at times have proven controversial. Many South Africans remember that Mr Ramaphosa was a board member of the Lonmin mining group at the time of the Marikana killings in 2012, when police shot dead 34 striking mine workers.
The vote was a long and acrimonious process. Delegates from around South Africa cast their ballots after repeated delays caused by disputes over who was entitled to vote.
Hundreds of attendees were banned from the poll, raising the possibility that supporters of Mrs Dlamini-Zuma, a former minister, could launch legal appeals against the result.
“I hope you will cooperate with the new leadership... as we move to the 2019 elections,” Baleka Mbete, party chairwoman, asked hopefully of delegates.
Mr Ramaphosa will have to take tough decisions to restore investor confidence and will confront a number of obstacles that will make it difficult to resuscitate the economy, according to Ben Payton, head of Africa Research at Verisk Maplecroft, a Bath, England-based risk-advisory company.
“It stretches credibility to imagine that Ramaphosa could win the ANC leadership without striking deals with key power brokers who seek to maintain a patronage-based political system. The struggle to hold the ANC together would dominate Ramaphosa’s tenure as leader and influence all his most important policy decisions.”