South Africa's ruling party, the African National Congress party, has suffered its biggest election setback since assuming power at the end of apartheid a generation ago, with less than 1% of the votes left to be counted today and results for two of the country's largest cities too close to call.
Final results of largely peaceful municipal elections were being announced at 6 pm (1600 GMT). Races remained tight in the largest city, Johannesburg, and Tshwane, the metropolitan area of the capital.
The African National Congress party, since South Africa's all-race election in 1994, 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.
"Election after election, the ANC has hung on to its past glory and kept its place in the hearts of most South Africans.
... This time round, though, it's not enough," the Mail & Guardian newspaper said in an editorial. On social media, South Africans mocked President Jacob Zuma's recent claim that the ANC would rule "until Jesus comes back."
The ANC already has lost its first major black-majority municipality in this election, Nelson Mandela Bay, named after 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.
The party already runs the country's second largest city, Cape Town, the only major South African city where blacks are in the minority among white and mixed-race residents.
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.
Neither party appeared to have a majority in Johannesburg or Tshwane that would allow it to govern alone, raising the likelihood of coalition governments. A more radical opposition party, the Economic Freedom Fighters, contested the local elections for the first time and received 8 per cent of the vote nationwide after promising measures to help the poor.
The ANC so far has received 53% 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.