South Africa is set to end three decades of dominance by the party that freed it from apartheid as voters angry at joblessness, inequality and power shortages slash the African National Congress's (ANC) share of the vote to 40 per cent.
A dramatically weakened mandate for the legacy party of Nelson Mandela, down from the 57.5 per cent it received in the previous 2019 parliamentary election, means the ANC must share power with a rival to keep it - an unprecedented prospect.
Vote tallying from Wednesday's poll was entering the final stages on Saturday morning, with results tallied from 98 per cent of polling stations giving the ANC 40.15 per cent.
The main opposition party, the Democratic Alliance (DA), had 21.71 per cent with uMkhonto we Sizwe (MK), a new party led by former president Jacob Zuma, on 14.76 per cent.
The ANC has won every previous national election by a landslide since the historic 1994 vote that ended white minority rule, but in the past decade its support has dwindled as the economy stagnated, unemployment rose and roads and power stations crumbled.
MK's strong performance, especially in Zuma's home province of KwaZulu-Natal, was one of the main reasons the ANC failed to secure a majority.
It will now have to strike a coalition deal or another form of agreement with one or more smaller parties.
Political parties' shares of the vote determine their seats in the National Assembly, which elects the nation's president.
Investors in Africa's most industrialised economy will hope the uncertain picture can quickly become clear.
President Cyril Ramaphosa can in theory still keep his job, as the former liberation movement was on course to get about twice as many votes as the next party.
But he will be badly weakened and could face calls to quit from both opposition parties and critics in the deeply divided ANC.
On Friday, however, a top ANC official backed him to stay on as party leader.
Analysts say he has no obvious successor.
A deal to keep the ANC in the presidency could involve opposition backing in exchange either for cabinet posts or for more control of parliament, perhaps even the speaker.
The election commission has pencilled in a final results announcement for Sunday.