South Africa's ruling party on Monday elected Cyril Ramaphosa, a unionist turned wealthy businessman, as its new leader in a closely fought race that marks a departure from the scandal-plagued tenure of President Jacob Zuma.
While Zuma, 75, no longer has an official position within the African National Congress, he has two years left as president of the country.
Ramaphosa, 65, will now stand as presidential candidate for the ANC, which has governed South Africa since the end of apartheid, in the next election, due to be held in 2019.
"Today is a victory for the ANC and South Africa," Ramaphosa's official Twitter account said. "We started the campaign knowing that the real work would begin after conference. We will build, renew and unite the ANC to improve the lives of our people."
Party officials said Ramaphosa won by a narrow 2,440 to 2,261 votes over rival candidate Nkosazana Dlamini-Zuma at the ANC's leadership conference, held at an exhibition center in Soweto, near Johannesburg.
Ramaphosa and Dlamini-Zuma hugged shortly after the results were announced.
The conference venue was a sea of singing and dancing as rival camps faced off ahead of the vote. Celebrations continued late into the night after Ramaphosa's victory.
Dlamini-Zuma, 68, a former medical doctor, Cabinet minister and chairwoman of the African Union commission, was tainted by support from Zuma, her ex-husband. Zuma has faced a near-constant string of scandals during his time in office, most recently over allegations that he allowed a wealthy family of Indian immigrants to exert undue influence on Cabinet appointments and government contracts.
Ramaphosa, a former union leader and the ANC's chief negotiator during the transition to democracy, is seen as pragmatic, pro-business and standing firm against corruption. He had been Nelson Mandela's preferred choice to succeed him as president in 1999, but the party instead chose Thabo Mbeki.
Ramaphosa left active politics and made a fortune in the private sector before winning the position of ANC deputy president at the last leadership conference, in 2012. He became deputy president of the country in 2014.
Nearly 5,000 delegates from ANC branches around the country also chose a deputy leader and filled four other top party positions Monday.
The new deputy leader of the party — replacing Ramaphosa — is David Mabuza, the current premier of Mpumalanga province in eastern South Africa. Mabuza is a controversial figure whose term in provincial government has been marred by corruption allegations, though he has denied any wrongdoing.
Two of the other top positions were also filled by perceived Zuma loyalists.
Richard Calland, a political analyst, said that while Ramaphosa's victory marks a break with the Zuma era, without a decisive win the new party leader may be constrained in his ability to see out ambitious economic reforms and crack down on corruption.
"It's going to be very difficult for him to maneuver," Calland said. "He is going to have to compromise at every step."
In his final speech as party leader, Zuma on Saturday praised branches of the party that have been loyal to him — including the youth league and women's league — and came out swinging at his many critics, including corporate South Africa, the media, the courts and civil society.
"The mobilization of the media against the country and the ANC — from Johannesburg to London, New York and Washington, D.C. — has gained momentum in recent months," Zuma said, to a smattering of cheers.
Ever defiant in the face of criticism over his leadership, he told the crowd: "I tried my best."