Early 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 27% voting districts counted so far, the ANC is leading with 43%, 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%, a big drop 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, said Prof William Gumede, chairman of the non-profit Democracy Works Foundation.
"The ANC could turn him into a scapegoat, and a faction within the party could push for him to be replaced by his deputy, Paul Mashatile. The EFF and MK are also likely to demand his resignation before agreeing to any coalition with the ANC," Prof Gumede told the BBC.
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, Prof Gumede said.
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 local time.
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.
"The turn-out amongst them was high, and they voted against the ANC," Prof Gumede said.
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.
The DA has signed a pact with 10 of them, 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.