The ANC was also unlikely to make it to a 50 percent outright majority in the capital Pretoria and economic-hub Johannesburg.
Urban South Africans dealt the ANC its biggest political blow since the end of apartheid on Thursday, 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 percent 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.
The municipal vote comes as Africa's most industrialised country teeters on the edge of a recession after a string of corruption scandals surrounding Zuma.
ANC LOSES ZUMA'S HOMETOWN
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 percent at 1630 GMT, against 27 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 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.
"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," 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.
By late afternoon, the ANC had a slim lead in Tshwane municipality, home to the capital Pretoria.
The ANC had 42.9 percent of the votes in Tshwane municipality against the DA's 42.7 percent after half of the votes had been counted.
In Johannesburg, the opposition party's lead had been trimmed to 42.09 percent to 42.02 percent for the ANC, with 40 percent of the votes tallied, while in Nelson Mandela Bay it led with 56 percent versus 38 percent, with 85 percent of votes in.
The DA had 69 percent of the vote in Cape Town against the ANC's 22 percent, with 77 percent of the 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.
"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.
"There is no metro that is a given at this point," said ANC Secretary General Gwede Mantashe. He said votes in the party's strongholds in Nelson Mandela Bay had not yet been counted.
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.
"Foreign investors will probably welcome the fact that reduced support for the ruling ANC has helped the centrist DA rather than the leftist EFF," said John Ashbourne, Africa analyst at Capital Economics, in a note.
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 labour 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 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.