The African National Congress (ANC) vowed on Friday to learn from bruising local election results that showed South African voters drifting away from the party that led the anti-apartheid struggle.
With about 95% of the nationwide vote counted, the ANC was ahead overall but recorded its worst electoral performance since white-minority rule fell 22 years ago.
The party once headed by Nelson Mandela was on 54% -- sharply down from 62% in the last municipal elections in 2011.
On Friday, it conceded defeat to the opposition Democratic Alliance (DA) in Port Elizabeth, an industrial city that was a key battleground of Wednesday's election.
The two parties were in a close fight for Pretoria, the capital, and Johannesburg, the country's economic centre, with the ANC set to lose its outright majorities in both cities.
"We are now going to do an introspective look at ourselves," said Cyril Ramaphosa, vice president of the ANC and the country.
"(Our critics) think that we are arrogant, they think we are self-centred... I would like to dispute that and say we are a listening organisation."
Defeat in Port Elizabeth was a humiliating blow for the ANC as the municipality is officially known as "Nelson Mandela Bay" in tribute to its past as a hotbed of anti-apartheid activism.
"The fall in support has been dramatic, in levels never seen before," political analyst Somadoda Fikeni told AFP.
"The poor performance, particularly in urban metros, points to declining support among the middle-class.
"These voters are concerned about the issues affecting the economy and unemployment."
The results were seen as a marker ahead of the next general election due in 2019.
President Jacob Zuma will not stand again after serving the maximum two terms.
According to official results on Friday, the DA was on 25% with the radical leftist Economic Freedom Fighters (EFF) on 9%.
Zuma under pressure? 
"We are buoyant as we await the newest results that come in," the DA said in a statement.
"It is clear that South African voters have identified strongly with the DA."
The election was widely seen as a referendum on Zuma, who has been plagued by a series of scandals and court cases since taking office in 2009.
An unemployment rate of 27% and GDP growth at zero percent have added to his woes as frustration builds among poor black communities seeing scarce improvements since apartheid fell.
Zuma, 74, who was jailed on Robben Island with Mandela during apartheid, retains deep loyalty within the ANC and in many rural areas, but he could step down before his term ends in 2019.
"All of this points at Zuma, ultimately the buck stops with him," Fikeni said.
"The corroded moral authority of the ANC under Zuma is one of the factors, and his name keeps featuring in major political scandals."
Complete results were expected late Friday or Saturday.
Contesting its first local poll after bursting onto the scene in the 2014 general election, the far-left EFF could emerge in the influential role of kingmaker.
"We are happy that the ANC has been punished," charismatic party leader Julius Malema said.
"The writing is on the wall, and (the election in) 2019 is going to be a serious challenge for the ruling party."
The EFF, which won six percent of the national vote in 2014, advocates land redistribution without compensation and the nationalisation of mines.
Turnout was about 58% as voters chose mayors and other local representatives responsible for hot-button issues including water, sanitation and power supplies.
Problems providing such basics trigger regular and sometimes violent "service delivery" protests in South Africa, where harsh socio-economic divisions remain a grim legacy of the apartheid era.
Related Story