Early South African vote results show ruling party losses

Election officials start the ballot counting process at a polling station during municipal elections in Manenberg on the outskirts of Cape Town, South Africa, Wednesday, Aug. 3, 2016. South Africans voted Wednesday in municipal elections described as the most closely contested for the African National Congress since it took power in the first all-race elections in 1994. (AP Photo/Schalk van Zuydam) (The Associated Press)

Election officials start the ballot counting process at a polling station during municipal elections in Manenberg on the outskirts of Cape Town, South Africa, Wednesday, Aug. 3, 2016. South Africans voted Wednesday in municipal elections described as the most closely contested for the African National Congress since it took power in the first all-race elections in 1994. (AP Photo/Schalk van Zuydam) (The Associated Press)

Election officials start the ballot counting process at a polling station during municipal elections in Manenberg on the outskirts of Cape Town, South Africa, Wednesday, Aug. 3, 2016. South Africans voted Wednesday in municipal elections described as the most closely contested for the African National Congress since it took power in the first all-race elections in 1994. (AP Photo/Schalk van Zuydam) (The Associated Press)

South African media say early results from municipal elections show the country's ruling party in the lead nationally, but trailing in several key metropolitan areas where the opposition has mounted a strong challenge.

With about half the ballots counted Thursday, the ruling African National Congress had won 52 percent of the vote and 21 municipal councils, compared to nearly 30 percent and 6 councils for the opposition Democratic Alliance.

A South African news outlet, eNCA, says the Democratic Alliance is leading in early results from Johannesburg; Tshwane, the greater metropolitan area of the capital, Pretoria; and Nelson Mandela Bay, a municipality on the east coast.

The elections Wednesday were the most closely contested for the African National Congress since it took power in South Africa's first all-race elections in 1994.