South Africans are voting in municipal elections in which the ruling African National Congress seeks to retain control of key metropolitan areas despite a vigorous challenge from opposition parties.

About 26 million people have registered to vote at a total of more than 22,000 polling stations in an election Wednesday that analysts describe as the most closely contested for the African National Congress since it took power in South Africa's first all-race elections in 1994.

Opposition parties hope to make big gains against the ruling party in Johannesburg, Tshwane, which is the greater metropolitan area of the capital, Pretoria, and Nelson Mandela Bay, a municipality on South Africa's east coast. The opposition Democratic Alliance already runs the city of Cape Town.