South Africans voted at schools, community centres and in large white tents set up in open fields in an election seen as their country’s most important in 30 years.
It could put the young democracy in unknown territory.
At stake is the three-decade dominance of the African National Congress (ANC) party, which led South Africa out of apartheid’s brutal white minority rule in 1994.
It is now the target of a new generation of discontent in a country of 62 million people – half of whom are estimated to be living in poverty.
After casting his vote, President Cyril Ramaphosa said that he had no doubt his ANC would win again with “a firm majority”.
The main opposition leader, John Steenhuisen, countered: “For the first time in 30 years, there is now a path to victory for the opposition.”
The election was held on one day and polls closed after 14 hours of voting at more than 23,000 stations across South Africa’s nine provinces.
Counting will start but final results are not expected for days. The independent electoral commission that runs the election said they would be announced by Sunday.
Africa’s most advanced economy has some of the world’s deepest socioeconomic problems, including one of the worst unemployment rates at 32%.
The lingering inequality, with poverty and joblessness disproportionately affecting the black majority, threatens to unseat the party that promised to end it by bringing down apartheid under the slogan of a better life for all.
“I take voting as something serious because as communities, it is difficult to complain about services when you have not voted,” said Samuel Ratshalingwa, who was near the front of the queue at the same school in the Johannesburg township of Soweto where Mr Ramaphosa voted.
“Our main issue here in our community is the lack of jobs. We have to use the vote to make our voices heard about this problem,” said Mr Ratshalingwa.
After winning six successive national elections, several polls have the ANC’s support at less than 50% ahead of this one, an unprecedented drop.
It might lose its majority in parliament for the first time, although it is widely expected to hold the most seats.
The ANC won 57.5% of the vote in the last national election in 2019, its worst result to date and down from a high of nearly 70% of the vote 20 years ago.
Mr Ramaphosa, the leader of the ANC, has promised to “do better”.
The ANC has asked for more time and patience.
Mr Ramaphosa, 71, sat alongside other voters in Soweto, where he was born, before shaking hands with two smiling officials who registered him and then voting.
“I have no doubt whatsoever in my heart of hearts that the people will once again invest confidence in the African National Congress to continue to lead this country,” Mr Ramaphosa said.
He said he was certain South Africans would give the ANC “a firm majority”.
Any change in the ANC’s hold on power could be monumental for South Africa.
If it does lose its majority, the ANC is likely to face the prospect of having to form a coalition with others to stay in government and keep Mr Ramaphosa as president for a second term.
The ANC having to co-govern has never happened before.
South Africans vote for parties, not directly for their president.
The parties then get seats in parliament according to their share of the vote and those legislators elect the president after the election.
The ANC has always had a majority in parliament since 1994.
The election will be held on one day across South Africa’s nine provinces, with nearly 28 million people registered to vote at more than 23,000 polling stations.
Final results are expected by Sunday.
The opposition to the ANC in this election is fierce, but fragmented.
The two biggest opposition parties, the Democratic Alliance (DA) and the Economic Freedom Fighters, are not predicted to increase their vote by anything near enough to overtake the ANC.
The DA is part of an agreement with other smaller parties to combine their vote in an effort to remove the ANC completely, but that is not seen as likely.
Disgruntled South Africans are moving to an array of opposition parties; more than 50 will contest the national election, many of them new.
One is led by South Africa’s former president Jacob Zuma, who has turned against his former ANC allies.
Mr Zuma was disqualified from standing as a candidate for parliament but his MK Party is still contesting and is the wild card.
The ANC says it is confident of retaining its majority and analysts have not ruled that out, given the party’s decades of experience in government and its unmatched grassroots campaigning machine.
It still has wide support, especially among older voters and those in more rural areas.
“I woke up at 4am this morning, took a bath and made my way,” said 68-year-old Velaphi Banda, adding he has voted for the ANC since 1994 and would do so again.
“I was never undecided about which party I will vote for. I have always known.”
Mr Ramaphosa has pointed out how South Africa is a far better country now than under apartheid, when black people were barred from voting, were not allowed to move around freely, had to live in certain areas and were oppressed in every way.
This election is only South Africa’s seventh national vote in which people of all races are allowed to take part.
Memories of that era of apartheid, and the defining election that ended it in 1994, still frame much of everyday South Africa.
But fewer remember it as time goes on, and this election might give voice to a younger generation who were not born when apartheid fell.
The vote will showcase the country’s contradictions, from the economic hub of Johannesburg – labelled Africa’s richest city – to the picturesque tourist destination of Cape Town, to the informal settlements of shacks in their outskirts.
There were delays in some polling stations opening, with voting due to start at 7am and end at 9pm.
South Africa has held peaceful and credible elections since a violent build-up to the pivotal 1994 election.
The independent electoral commission said two days of special early voting went smoothly on Monday and Tuesday, although two people were arrested for interfering with voting operations, it said.
South Africa will deploy nearly 3,000 soldiers across the country to ensure a peaceful election, authorities said.
While 80% of South Africans are black, it is a multiracial country with significant populations of white people, those of Indian descent, those with biracial heritage and others.
There are 12 official languages.
It is the diversity that Nelson Mandela, South Africa’s first black president, highlighted as a beautiful thing by referring to his country as a “Rainbow Nation”.
It is a diversity that, with the emergence of many new opposition parties, also might now be reflected in its politics.