Johannesburg, South Africa (CNN)Thousands of delegates will descend on a conference center south of Johannesburg this weekend, facing a crucial decision on what direction South Africa will take.
Battle for South Africa's future takes center stage at ANC conference
The delegates will vote on the top leadership of the ruling African National Congress (ANC), something they do roughly every five years. Because of the party's sizable majority in parliament, the vote should effectively determine who the country's next leader will be.
The 54th ANC elective conference is perhaps the most anticipated in a generation. And it is a key test for embattled President Jacob Zuma, whose successor as party leader will be chosen there.
To many, the conference is also a referendum on the tenure of Zuma, who has been beset by corruption scandals for years.
Zuma's presidential term runs out in 2019, but depending on who prevails in the conference, that term could be cut short.
The ANC is riven by brutal factionalism and many of its leaders have been damaged by sustained allegations of large-scale corruption -- no one more so than Zuma.
Just days ahead of the conference, a High Court judge ruled that Zuma couldn't block a commission of inquiry into allegations of large-scale corruption and influence-peddling between Zuma, his family and powerful Indian businessmen.
Judge Dunstan Mlambo ruled that Zuma's attempt to stop the commission was "ill-advised and reckless," and ordered the President to personally pay the costs of the court action.
The ANC welcomed the move. Zuma has not responded to the court rulings but may look to appeal.
In October, the Supreme Court of Appeal said that corruption charges should be reinstated against the President over allegations relating to an arms deal in the 1990s. He could face multiple charges of corruption, racketeering and fraud.
And that is just one set of allegations against Zuma, his family and his political allies. Read about others and Zuma's political woes here, here and here.
Zuma and those close to him have repeatedly denied allegations of corruption. But a series of leaked emails leading to almost daily revelations has reinforced the impression in South Africa that the rot runs deep.
In recent months, the allegations of corruption have implicated several global corporate giants.
South Africa's economy has limped along since the global financial crisis. Zuma's decisions to fire not one but two respected finance ministers have played a major role in downgrades to the country's credit rating.
But it is the continuing legal and political troubles of Zuma, who narrowly survived a no-confidence vote in parliament earlier this year, that have proven deeply damaging to the ANC.
The party took a surprise beating in local elections in 2016 and faces a substantial hurdle to win an outright majority in the 2019 national election.
Open opposition to Zuma from within the party is growing.
This weekend's elective conference is, in many ways, a proxy battle over Zuma, his allies and the direction the country should take.
There are several candidates for ANC president, but two clear frontrunners going into the conference.
Cyril Ramaphosa is currently the country's Deputy President. He made his name as a trade union leader during apartheid and as the chief negotiator for the ANC during the tense political transition.
Ramaphosa left government and made a fortune in business. Since returning to public life, he has become openly critical of the levels of corruption in the country and has significant support in urban areas, among the business community and ANC stalwarts.
Nkosazana Dlamini-Zuma is a former cabinet minister and head of the African Union. She is also Zuma's ex-wife.
Dlamini-Zuma has significant rank-and-file support and is fiercely supported by the ANC Women's League and ANC Youth League.
But her association with Zuma has led to speculation that she will protect him from prosecution. In November, she said "all types of corruption must be dealt with."
In the run-up to the national conference, there have been multiple legal disputes and allegations of vote buying.
Supporters of Ramaphosa and Dlamini-Zuma stand to gain government positions and party influence if their preferred candidate wins.
Any future president also has wide discretion in appointing the head of the national prosecuting authority, leadership of the police and head of the Hawks -- an elite law-enforcement unit that focuses on organized crime and graft.
With so much to lose, all eyes are on who will win and how the losers react.
As the current ANC Secretary General Gwede Mantashe put it, "Everybody who wants to be nominated must equally prepare not to be nominated -- 'If I don't succeed, I will accept the outcome.'"