Thousands of delegates from South Africa's ruling ANC party hunkered down Sunday to choose their next leader in a vote widely seen as a decisive moment in the country's post-apartheid history.
The front-runners in the tight race are former minister Nkosazana Dlamini-Zuma, who is President Jacob Zuma's ex-wife, and Deputy President Cyril Ramaphosa, a wealthy businessman.
With public support for the ANC falling sharply, the party could face a struggle to retain its grip on power in the 2019 general election after ruling since Nelson Mandela won the first multi-racial elections in 1994.
Delegates could vote for the new leader as early as Sunday, with the five-day conference due to end on Wednesday.
President Zuma, whose reign has been marred by graft scandals, will step down as ANC chief at the meeting, but he will remain as head of state ahead of general elections in 2019.
He used his conference speech on Saturday to appeal for unity in a party riven by bitter factions under his rule.
He blamed the decline in the ANC's popularity on "perceptions in society that we are soft on corruption, self-serving and arrogant".
"Petty squabbling that takes us nowhere needs to take a back seat," he said.
"Our people are frustrated when we spend more time fighting among ourselves instead of solving the daily challenges they experience."
The ANC candidates had agreed "to abide by the outcome of the conference. I want each of them to bear that in mind," he added.
- Party split? -
Zuma's speech was greeted with weak applause and a partial standing ovation after raucous party delegates had danced and sang songs in support of their chosen candidate to succeed him.
He is seen as supporting Dlamini-Zuma, who may protect him from prosecution over graft charges.
Some analysts say the party could split after the contentious leadership battle.
The ANC is still South Africa's biggest party by far, but the 54 percent it won in local elections last year was its worst poll result since 1994.
Opposition parties the Democratic Alliance and Economic Freedom Fighters are hoping to exploit the ANC's woes in the 2019 election, with one possible outcome being a coalition government.
Soaring unemployment and state corruption have fuelled frustration at the ANC among millions of poor black South Africans who face dire housing, inadequate education and continuing racial inequality.
The conference, held outside Johannesburg, started seven hours late on Saturday after disputes over which delegates are qualified to vote.
Dlamini-Zuma, 68, headed the African Union commission until earlier this year and is a former interior, foreign affairs and health minister.
But her critics say she would pursue Zuma's failing economic and political policies.
The couple had four children together before divorcing in 1998.
Ramaphosa, 65, a former trade union leader, led the historic negotiations in the 1990s to end apartheid before launching a business career that made him one of the country's wealthiest men.
He is often accused of failing to confront Zuma while serving as his deputy since 2014.
His chances received a boost when parliament speaker Baleka Mbete backed him to be the leader in an eleventh hour intervention.
"We publicly endorse Cyril... and we agree on how to approach the issue of maximising unity," she said outside the conference hall late on Saturday.
Ben Payton, an analyst at the global risk consultancy Verisk Maplecroft, said Ramaphosa was well-positioned for victory but Dlamini-Zuma "remains within touching distance of an upset win".
"The conference provides an opportunity for the party to change direction after eight years in which the economy has flatlined, increasingly extreme rhetoric has scared off investors, and corruption has overwhelmed public finances," he said.