Urban South Africans dealt the ANC its biggest political blow Thursday since the end of apartheid, knocking the ruling party off its perch in three cities as voters vented anger at corruption, high unemployment and poor public services.

The African National Congress (ANC), which ended white minority rule when it won power in the first democratic national election in 1994, held a big lead in the overall count in nationwide municipal elections.

But it was trailing the opposition Democratic Alliance (DA) in Port Elizabeth, which it has previously held virtually unopposed for the last two decades.

The ANC was also unlikely to make it to a 50 per cent outright majority in the capital Pretoria and economic-hub Johannesburg.

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.

A woman wearing a traditional dress with the face of South African President Jacob Zuma waits to cast her ballot during municipal elections in Khayelitsha township on the outskirts of Cape Town on Wednesday. Partial returns indicated the governing African National Congress was unlikely to make it to a 50 per cent outright majority in the capital Pretoria and economic hub Johannesburg. (Associated Press) The municipal vote comes as Africa's most industrialized country teeters on the edge of a recession after a string of corruption scandals surrounding Zuma.

The ANC lost Zuma's hometown of Nkandla in Kwa-Zulu Natal province, a personal blow to Zuma, where the Inkatha Freedom Party retained its hold on the region.

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 54 per cent against 27 per cent for the DA and seven per cent for the radical left-wing Economic Freedom Fighters. Final results are expected on Friday.

Democratic Alliance leads in Johannesburg

The DA, which last year elected its first black leader, Mmusi Maimane, was ahead 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 he expected the DA to be the biggest single party in Nelson Mandela Bay but to fall short of a majority.

South African President Jacob Zuma arrives at Parliament in Cape Town on Feb. 11 for the state of the nation address. 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. (Associated Press) "In the case of Tshwane and Johannesburg the ANC will be the biggest party, but very significantly, it will fall below 50 per cent, so we are looking at a major setback," he said. "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. The ANC had a slim lead in Tshwane municipality, home to the capital Pretoria.

"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.

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.

"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.

Economic Freedom Fighters run third

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 per cent 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 eight per cent of the population.

The rand currency and government bonds firmed on Thursday, boosted by the smooth running of the elections.

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 Nkandla. 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.