The first results have been announced from what is seen as South Africa’s most closely fought elections since the African National Congress (ANC) came to power 30 years ago.
With results from around 22% voting districts counted so far, the ANC is leading with 44%, followed by the Democratic Alliance (DA) with 25%.
The radical Economic Freedom Fighters (EFF) has about 9%, while the uMkhonto weSizwe Party (MK Party) of former President Jacob Zuma is on around 8%.
Final results are expected over the weekend.
The initial results suggest the ANC will lose its parliamentary majority for the first time since Nelson Mandela led the party to victory following the end of the racist system of apartheid in 1994.
Many voters blame the ANC for the high levels of corruption, crime and unemployment in the country.
The respected Council for Scientific and Industrial Research (CSIR) and the News24 website have projected that the party’s final vote could be around 42%, down from the 57% it obtained in the 2019 election.
This would force it go into a coalition with one or more of the other parties in order to form a majority in parliament.
The DA has liberal economic policies, while both the EFF and MK favour more state intervention and nationalisation, so the choice of partner would make a huge difference to South Africa’s future direction.
It is unclear whether President Cyril Ramaphosa will remain in power, as he could come under pressure from the ANC to resign if the party gets less than 45% of the final vote.
South Africans do not directly vote for a president. Instead they vote for members of parliament who will then go on to elect the president.
The initial results show that the ANC is suffering heavy losses to MK, especially in KwaZulu-Natal, where Mr Zuma’s party is leading with 43% of the vote to the ANC’s 21%.
Mr Zuma caused a major shock when he announced in December that he was ditching the ANC to campaign for MK.
KwaZulu-Natal is the home region of Mr Zuma, and the province with the second-highest number of votes, making it crucial in determining whether the ANC retains its parliamentary majority.
Although Mr Zuma has been barred from running for parliament because of a conviction for contempt of court, his name still appeared on the ballot paper as MK leader.
If MK wins KwaZulu-Natal, it would be a “major upset” and herald the “potential decimation” of the ANC in the province, political analyst William Gumede told the BBC.
The ANC also risks losing its majority in the economic heartland of Gauteng, where the party currently has 36% to the DA’s 29%.
Wednesday’s election saw long lines of voters outside polling stations late into the night across the country.
According to the electoral commission, the last polling station closed at 0300 on Thursday morning.
One electoral official in Johannesburg told the BBC the queues were reminiscent of the historic 1994 election, when black people could vote for the first time.
Sifiso Buthelezi, who voted in Johannesburg’s Joubert Park – the biggest polling station in South Africa – told the BBC: “Freedom is great but we need to tackle corruption.”
Change has been a recurring sentiment, especially among young voters.
Ayanda Hlekwane, one of South Africa’s “born-free” generation, meaning he was born after 1994, said despite having three degrees he still doesn’t have a job.
“I’m working on my PhD proposal so that I go back to study in case I don’t get a job,” he tells the BBC in Durban.
But Mr Hlekwane said he was optimistic that things would change.
Support for the ANC is expected to be higher among the older generation.
One 89-year-old woman, Elayne Dykman, told the BBC she hoped that young people in South Africa did not take their vote for granted.
A record 70 parties and 11 independents were running, with South Africans voting for a new parliament and nine provincial legislatures.
Analysts say this shows that many people are disillusioned with the ANC.
“We are entering the next phase of our democracy, and it is going to be a big transition,” political analyst Richard Calland told the BBC.
“We will either become a more competitive and mature democracy, or our politics will become more fractured.”
The DA has signed a pact with 10 other parties, agreeing to form a coalition government if they get enough votes to dislodge the ANC from power.
But this is highly unlikely, with the ANC expected to remain the biggest party, putting it in pole position to lead a coalition, even if its support does drop below 50%.