South Africa’s ruling party retained its grip, but the opposition saw major gains in the fourth local government elections since the end of the racist apartheid government in 1994.

With counts now affirmed at more than 95 percent of the country's polling stations, the African National Congress (ANC) won 63.5 percent of all votes cast, down from its 67 percent in the 2006 local elections. The second largest party, the Democratic Alliance, saw its support surge from 14 percent in 2006 to 22 percent, leaving behind hundreds of smaller parties with single or no-digit support.

South Africa's municipal elections are naturally contentious because local governments are the front lines of South African politics, deciding the officials who manage the roads and schools, allotments of free housing for the poor, and the management of other basic services.

This year’s campaign was made all the more fiery by angry protests in once-stalwart ANC bastions of support over the failure of local ANC officials to deliver on their promises to expand government services like drinking water and electricity, as well as a series of scandals in local governments in Cape Town and in the Free State which had provided public toilets with no enclosures in several poor black townships.

Paul Mashatile, the chairman of the ANC in the province that includes Johannesburg and Pretoria, admitted that voters appeared to be angry in the Wednesday May 18 elections. But he said that voters in townships such as Zandspruit, which recently was blocked off with burning tires over the lack of basic services, still ended up voting for the ANC.

“They said, 'we will give you another chance,’” Mr. Mashatile told reporters. “It shows that if we listen, visit, and talk to them, they will change their attitudes.”

The results also indicate that the DA may be moving away from being seen as a primarily white party. The DA leader, Helen Zille, said that most of the DA gains this election came from black voters who were disappointed with the ANC and were willing to give the DA a chance to govern.

"Only 8 percent of registered voters are white,” Ms. Zille said in an interview on a local talk radio station, Talk Radio 702. “Do the simple maths, white people are not the only ones who voted for the DA."

Local elections do not change the balance of power at the national level, of course, but it can be a gauge for how South African voters might cast their votes in national elections to be held in 2013. Any sign of weakness may give momentum to those within the ruling ANC who are sparring for power and would like to unseat the current South African President Jacob Zuma.