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 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 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 will start to trickle in on Thursday morning and final results are expected over the weekend.
The ANC has lost support due to anger over high levels of corruption, crime and unemployment. Opinion polls suggest it could lose its majority in parliament.
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 in Durban she hoped that young people in South Africa did not take their vote for granted.
Source: BBC