South Africa’s governing African National Congress has been defeated by the opposition Democratic Alliance (DA) in local polls in the capital Pretoria.
With counting almost over, the DA has 43% of the vote compared with the ANC’s 41% in Tshwane, the municipality that includes Pretoria.
The DA will need to form a coalition in order to secure control there.
The two major parties are also locked in a tight race to control the country’s largest city, Johannesburg.
The ANC has also lost Nelson Mandela Bay metropolitan area in the Eastern Cape to the DA.
It is the ANC’s worst electoral performance since the end of apartheid and the advent of democracy in 1994, and the first time since then that it has lost control of the capital.
The DA has won 93 seats while the ANC is second with 89 seats in the 214-seat Pretoria-area municipal council.
Observers say a host of corruption scandals and internal party squabbles are to blame for the ANC’s decline.
But the BBC’s Milton Nkosi says the party of late former President Mandela, with 54% of the national vote, still commands strong support.