South Africa's Jacob Zuma gave his last speech as African National Congress head today, as the only party in power since the end of apartheid prepared to pick its next leader, and likely future president, in a vote that was too close to call.

The election is perhaps the most pivotal moment for the ANC in its 23 years of power. Scandal and corruption allegations have tainted Mr Zuma's presidency and the party that launched black majority rule under Nobel Peace Prize laureate Nelson Mandela is now deeply divided, its image tarnished at home and abroad.

The race to succeed the 75-year-old as ANC leader has been dominated by Deputy President Cyril Ramaphosa, 65, generally favoured by financial markets, and Nkosazana Dlamini-Zuma, 68, (both pictured below) an ex-cabinet minister, chairwoman of the African Union Commission and Mr Zuma's ex-wife.

Mr Zuma, who is backing Ms Dlamini-Zuma in the race, can remain head of state until 2019.

Ramaphosa and Dlamini-Zuma

The ANC will announce Mr Zuma's successor tomorrow, concluding a bruising leadership battle that threatens to splinter the 105-year-old liberation movement.

A trained lawyer and former union leader, Mr Ramaphosa, 65, has vowed to fight corruption and revitalise an economy that has slowed to a near-standstill under Mr Zuma with 28% unemployment and credit rating downgrades.

That message has played well with foreign investors and Mr Ramaphosa is expected to be backed by ANC veterans, labour unions and civil society organisations.

In contrast, Ms Dlamini-Zuma is seen as a fierce campaigner against racial inequality whose hostility to big business has rattled investors.

"She has not made corruption the only pillar of her campaign, because the most critical issue in South Africa is this huge inequality," said Carl Niehaus, a key member of Ms Dlamini-Zuma's campaign.

In a boost to Mr Ramaphosa, courts ruled that some senior officials from provinces seen as supporting Ms Dlamini-Zuma had been elected illegally and were barred from the conference. 

The ANC's National Executive Committee, a decision-making group of senior leaders, met before the conference began and decided that barred delegates could not vote at the conference.

ANC Youth League leader Collen Maine, who backs Ms Dlamini-Zuma, said that meant 122 delegates - out of about 6,000 - would be prevented from voting, something he called "not significant".

Asked if barring the delegates helped Mr Ramaphosa, a senior official of Cosatu, South Africa's largest union federation, said: "Definitely. But we are not banking only on that. We have [to] trust that ANC delegates know what the country needs at the moment."

Mr Zuma warned members not to run to the courts to resolve party problems. He did not specifically mention the barring of delegates at the conference by the courts this week.

"Factionalism has become the biggest threat to the organisation," he said.