Urban South Africans dealt the African National Congress its biggest political blow since the end of apartheid on Thursday, knocking the ruling party off its perch in three major cities in local municipal elections.
The ANC - which ended white-minority rule when it won power in the country's first democratic national election in 1994 - held a big lead in the overall count.
But it's trailing the opposition DA in the cities of Pretoria, Johannesburg and Port Elizabeth, which it has previously held virtually unopposed.
A significant loss of support for the ruling party in these areas could mark a watershed in South African society and politics as the country shifts from what has effectively been a one-party system in the era immediately post-apartheid.
It could reshape the political landscape ahead of the 2019 national election, and may also embolden President Jacob Zuma's rivals within the ANC to challenge him.
The municipal vote comes against the backdrop of rising anger among voters at high unemployment and a lack of basic services as Africa's most industrialised country teeters on the edge of a recession, as well as a string of corruption scandals surrounding Zuma.
How does voting against corruption make me a traitor? So must I vote for the same ANC that killed innocent miners? #ElectionResults
— Lucia (@itsLuciaxo) August 4, 2016
Many ANC supporters are switching allegiances to the DA, bolstering its attempts to attract black voters and shake off its image of a party that chiefly serves the interests of the minority white community.
With about two-thirds of the vote counted, the ANC led in the national count with 53 percent at 1144 GMT, against 28 percent for the DA and 7 percent for the radical left-wing Economic Freedom Fighters. Final results are expected by Friday.
The DA, which last year elected its first black leader Mmusi Maimane, was leading the ANC in Tshwane municipality, home to the capital Pretoria, in Johannesburg and in Nelson Mandela Bay, the area named after the anti-apartheid hero who led the ANC to power and which includes the city of Port Elizabeth.
Daryl Glaser, lecturer in political studies department at the University of the Witwatersrand in Johannesburg, said "In the case of Tshwane and Johannesburg the ANC will be the biggest party - but very significantly, it will fall below 50 percent, so we are looking at a major setback."
"We are into an era of coalition politics."
The DA is expected to maintain its control of Cape Town, the only big city currently not run by the ANC, where it had a large lead over the ruling party on Thursday.
The DA had 45 percent of the votes in Tshwane municipality against the ANC's 41 percent although only 44 percent of the votes had been counted.
In Johannesburg, the opposition party led with 44 percent to 40 percent for the ANC, with 31 percent of the votes tallied, while in Nelson Mandela Bay it led with 50 percent versus 39 percent, with almost three-quarters of votes in.
Opponents say defeat in a region named after the ANC's liberation hero would be an embarrassment for the ruling party.
"While the middle classes are upset about government incompetence and corruption, the working classes are economically frustrated by the lack of jobs – good paying or not," said Sebastian Spio-Garbrah, DaMina Advisors chief Africa frontier markets analyst and global managing director.
The ANC said it expected to retain Tshwane municipality but was not so sure about Johannesburg or Nelson Mandela Bay.
Some ANC backers said votes expected from black townships would eat into DA's lead in Nelson Mandela Bay. "I'm still hoping the ANC will win," said Yvonne Mehlo, 38, as she lay out fruit and vegetables at a roadside hawking stand in Port Elizabeth.
DA leader Maimane said his party would "put the best coalition on the table" when asked if he would be open to sharing power in some areas.
— iCherry ka.. (@LeeUnmoved) August 4, 2016
"We've shown some incredible growth in these elections and we're quite excited about that," said Maimane, whose party has promised to help create jobs and improve social services.
The DA had 70 percent of the vote in Cape Town against the ANC's 21 percent, with two-thirds of votes in.
The Economic Freedom Fighters (EFF), which is led by firebrand Julius Malema, Zuma's one-time protege and former ANC youth leader is participating in only its second election and was running a distant third in the votes counted.
It is, however, winning some support from voters frustrated about inequality in country where black people make up about 80 percent of the 54 million population, yet most of the economy in terms of ownership of land and companies remains in the hands of white people, who account for about 8 percent of the population.
The rand currency and government bonds firmed on Thursday, boosted by the smooth running of the elections.
Many South Africans who queued up to vote across the country said they were worried about Zuma's performance and the state of the economy, where one in four in the labor force is unemployed.
Zuma survived an impeachment vote in April after the Constitutional Court said he breached the law by ignoring an order to repay some of the $16 million in state funds spent on renovating his private home.
In December, he rattled investors after changing his finance minister twice in a week, sending the rand plummeting. Zuma has said he would repay some of the funds spent on his home and rejected criticism of his conduct.