Final results of largely peaceful municipal elections were being announced at 6 p.M. (1600 GMT). Races remained tight in the largest city, Johannesburg, and Tshwane, the metropolitan area of the capital.
Since South Africa's first all-race election in 1994, the African National Congress party has had widespread support on the strength of its successful fight against white-minority rule. But this time, it has been challenged by corruption scandals and a stagnant economy that has frustrated the urban middle class, while protests in poor communities demanding basics like electricity and water have been common.
The ANC already has lost its first major black-majority municipality in this election, Nelson Mandela Bay, named for the ANC's star and the country's first black president.
The opposition Democratic Alliance, which has roots in the anti-apartheid movement and had a white party leader until last year, won Nelson Mandela Bay after fielding a white candidate for mayor.
More From This Section
The party's leader, 36-year-old Mmusi Maimane, has predicted victory in Tshwane.
"For far too long, the ANC has governed South Africa with absolute impunity," Maimane said. He said the idea that his party was a white one has been "completely shattered."
The Democratic Alliance angered the ANC last month by declaring that it was the only party that could realize Mandela's dream of a "prosperous, united and non-racial South Africa."
Maimane immediately looked ahead to presidential elections. "The 2019 campaign starts now," he said.
The ANC so far has received 53 per cent of votes across the country, its lowest percentage ever, with the Democratic Alliance getting 26 per cent.
The results for the ANC could put pressure on the 74-year-old Zuma to leave office before his mandate ends in 2019, political analysts said.