South Africa's ANC party, the celebrated political force that led the struggle against apartheid rule and ushered in democracy, is preparing to elect a new leader -- but it faces a perilous future.
The risk of losing power at the 2019 general elections has loomed large over its party conference where the new party chief will be chosen in the coming days.
Here are four ways the once unassailable African National Congress (ANC) could be ousted from office.
- Party break-up -
If Nkosazana Dlamini-Zuma wins the conference vote, vanquishing front-runner and Deputy President Cyril Ramaphosa, Ramaphosa could lead his supporters out of the party.
"If Ramaphosa loses, a split is possible," Stellenbosch University politics professor Amanda Gouws told AFP.
The key alliance of the ANC, the South African Communist Party (SACP) and the Congress of South African Trade Unions (COSATU) that fought against white-minority rule has already ruptured under Zuma's leadership.
The SACP recently vowed to field its own candidates in elections instead of backing the ANC slate and won its first councillors in recent polls.
"The ANC appears to have nothing to offer citizens," Gouws said. "This is a story of liberation movements all over Africa. They are hierarchical which opens the doors to corruption, then the decline sets in."
- Falling popularity -
The country is in the grip of record unemployment, stagnant growth and endemic corruption.
The ANC was dealt a sharp shock in last year's local elections when it suffered its worst-ever results.
Dlamini-Zuma inspires little public support, while multi-millionaire Ramaphosa lacks credibility among many of the poorer voters.
"If they push leaders who do not have credibility and you add to that the extent of the scandals they have faced, they stand a very good chance of losing their majority in 2019," political analyst Ralph Mathekga told AFP.
The party still commands 249 of 400 seats in parliament, having secured 62.15 percent of the national vote in 2014 -- but its share of the vote slipped to 54 percent in last year's local polls.
If a significant portion of its 2014 vote was to abstain -- or shift to other parties -- the next election would be up for grabs.
- Challenge from the right -
The ANC faces effective and growing opposition from the main opposition Democratic Alliance.
It has sought to portray itself as economically competent and non-racial, pointing to its current record running previously ANC-controlled cities like Johannesburg and Pretoria.
Under its first black leader, Mmusi Maimane, the DA party climbed to 24 percent in the 2016 local vote.
But it has struggled to shed its image as a party for middle-class whites.
Its challenges were laid bare when former party leader Helen Zille sparked a furious backlash by saying that colonialism had brought some benefits for South Africans.
- Challenge from the left -
Attacking the ANC from the other flank is the radical Economic Freedom Fighters (EFF) under firebrand populist Julius Malema, a former Zuma protege.
Formed in 2013 after Malema's expulsion from the ANC, the EFF is a revolutionary socialist party that wants to overturn the post-apartheid consensus.
It taps into frustrations in the poverty-stricken townships and inspires horror in the elite by encouraging black communities to seize land.
Declining support may force the ANC to seek a coalition with one or more opposition parties -- but any deal appears likely to be unstable.
© Agence France-Presse