Votes are being counted after what is seen as South Africa’s most closely fought elections since the African National Congress (ANC) came to power 30 years ago.
Long lines snaked into the night outside polling stations across the country.
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, and which saw Nelson Mandela become president.
Many thousands of people were still waiting to vote when polls officially closed at 2100 local time (1900 GMT) but the electoral commission said they would all be allowed to cast their ballots.
The first results have been announced, from just over 10% voting districts.
The ANC is leading with 42%, followed by the DA with 26% and the EFF with 8%, while the uMkhonto weSizwe Party (MK Party) of former President Jacob Zuma is on just under 8%.
The final results are expected over the weekend.
Opinion polls suggest the ANC could lose its majority in parliament for the first time in 30 years, forcing it into a coalition.
The ANC has lost support due to anger over high levels of corruption, crime and unemployment.
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.”