With more than 95 percent of votes counted Friday in municipal elections, South Africa's ruling party appeared to be headed for its biggest electoral blow since it won power at the end of apartheid 22 years ago.

The results remained too close to call in the country's largest city, Johannesburg, or Tshwane, the metropolitan area of the capital, Pretoria. But the leader of the opposition Democratic Alliance, Mmusi Maimane, told reporters that his party had won Tshwane, beating the African National Congress, formerly the main anti-apartheid movement.

The Democratic Alliance has its roots in white liberal opposition to apartheid and remained a white-led party until last year. Neither it nor the ANC appeared to have a majority in Johannesburg or Tshwane that would allow it to govern alone, raising the possibility of coalition governments.

Deputy President Cyril Ramaphosa told reporters it was too early to analyze the election results, saying it would be like reading "somebody's tombstone before they die." Final results are set to be announced at 6 p.m. (1600 GMT) Saturday.

The ANC lost a key municipality named after its star, Nelson Mandela Bay, to the Democratic Alliance, which fielded a white candidate for mayor. The DA already runs the city of Cape Town, the country's second largest and the only major South African city where blacks are not in the majority, and has been pushing hard to win supporters in other regions.

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

The results for the ANC, which retained support in many rural areas in a country where blacks make up 80 percent of the population, could put pressure on President Jacob Zuma to leave office before his mandate ends in 2019, say political analysts.

The ANC has lost some support from people, notably in urban areas, who say their hopes for economic opportunities have not been fulfilled since the end of white minority rule. The South African economy has stagnated since the global financial crisis in 2008, and the World Bank says the country has one of the highest rates of inequality in the world.

Deputy President Ramaphosa acknowledged some criticisms of the ANC: "They think that we are arrogant, they think that we are self-centered, they think that we are self-serving, and I'd like to dispute all of that and say we are a listening organization."

In a statement, the ANC said that "we will reflect and introspect where our support has dropped." The party so far has received 54 percent of votes across the country, its lowest percentage ever, with the Democratic Alliance getting 26 percent.

Scandals swirling around Zuma have also hurt the ANC. Opposition groups have seized on the revelation that the state paid more than $20 million for upgrades to Zuma's private home. The Constitutional Court recently said Zuma violated the constitution and instructed the president to reimburse the state $507,000.

Many South Africans are also concerned over allegations that Zuma is heavily influenced by the Guptas, a wealthy business family of immigrants from India. The president has denied any wrongdoing.

A more radical opposition party, the Economic Freedom Fighters, contested the local elections for the first time. The party, which advocates the nationalization of industry and other measures it says will help the poor, has garnered almost 8 percent of the vote nationwide.

EFF leader Julius Malema, who once led the ANC's youth league, told reporters: "I want to see the ANC out of power."