There cannot be many political parties in the democratic world that are judged to have received an electoral kicking after winning 54% of the national vote. The African National Congress is in that position after South Africa’s nation-wide local elections on August 3rd.

It’s all relative. The ANC scored over 60% of the popular vote the previous two local elections; in the one prior to that, it was a fraction under 60%. In five national and provincial elections since 1994 it has remained above 60%. But the ANC’s electoral ascendancy is in a gradual decline, and South Africans have just witnessed the biggest single acceleration of the decline since the inauguration of inclusive democracy.

Local elections are, crucially, not a single national election. It involved separate contests in eight metropolitan, 44 district and 226 local municipalities. In some of these the ANC has suffered momentous setbacks. The ANC has fallen below 50% of the vote in four metropolitan municipalities — ‘metros’ — that it previously dominated with absolute majorities. These include South Africa’s largest city and hub, Johannesburg, and the country’s administrative capital, Tshwane (incorporating Pretoria). In Tshwane and Nelson Mandela Bay — which includes Port Elizabeth, a storied font of ANC leadership and activism — the ANC is not even the biggest single party. That prize goes in both cases to the Democratic Alliance. The party of Mandela is losing the cities.

Two background factors have powered ANC losses. The first is its leader, South Africa’s President Jacob Zuma, who has become emblematic of the corruption that pervades the post-apartheid political elite. The Zuma family has grown fat on state resources and the use of political influence to gain economic advantage. Zuma has been personally buffeted by the decisions of the Public Protector and the courts that he should pay back some of the public money poured over his private residential compound in Nkandla.

The other is the economic slowdown since 2008, with its accompanying dispiriting augmentation of South Africa’s already world-beating unemployment. The Zuma factor is relevant here too: the President has failed to offer decisive economic policy leadership and he has created the impression that he is willing to subordinate the most sophisticated branches of the state — like the Treasury — to his personal needs. His firing of a respected finance minister in December — almost certainly for obstructing pet spending projects of Zuma cronies — shocked international markets.

The proximate source of the ANC’s waning dominance is a third factor: the development of credible political opposition. The ANC support base is being eaten at from two sides.

On the one lies the Democratic Alliance, a liberal centrist party that evolved from older apartheid-era white parties but which has gained electoral traction thanks to a record of efficient government in Cape Town and the emergence of a crop of credible leaders of all races, including (for the first time) a black party leader in Mmusi Maimane. All of this has enabled the DA to make small but significant inroads into the black African vote, which it can add to the solid majorities it already enjoys among whites, mixed-race coloureds and Indians. The DA offers itself as the party of professionalism and clean government.

On the other side lurks a smaller but very bitter enemy in the Economic Freedom Fighters, sprung from ANC Youth League dissenters expelled from the ruling party following an earlier showdown with Zuma. The EFF offers itself as the party of black nationalism and populist economics — and as the grievance channel for those many black people who feel that not enough has happened since 1994 to address the country’s vast class and race inequalities. The EFF portrays the ANC as having sold out to “white monopoly capital” and Zuma as the captive of an immigrant Indian family of benefactors, the Guptas. The EFF’s tactics have been both disruptive and colourful, testing the limits of constitutional decorum while also conveying to many, even sceptics, that it is the party best able to challenge Zuma’s impunity. (Or the impunity of ‘Zupta’, as they put it — a moniker that amalgamates Zuma and Gupta.)

These factors working against the ANC have counterbalanced — though not fully — other familiar ones that continue to operate to the party’s advantage. The ANC is still admired by many blacks as the party that led the liberation of the country from apartheid. It benefits from the reflexes of racial identity politics, but also from rational gratitude: the ANC has deployed a sophisticated inherited state to build up a black middle class, legislate labour protections and roll out a social safety net for the poorest. The ANC has in addition gathered unto itself hefty advantages of incumbency, including control over vast numbers of jobs and tenders and leverage for its loyalists in business deals.

A great strength of the ANC has been its ability to operate as an irresitible magnetic force, sucking political difference and contestation into itself. A good deal of what looks like constant political instability — in particular local urban protests — turns out to involve factional struggles for resources inside the ruling party. At the same time the Tripartite Alliance between the ANC, South African Communist Party and Cosatu union federation provides, or has until recently, the main arena of ideological contestation between the country’s most influential socialists and nationalists, pragmatists and radicals, liberals and traditionalists. When ANC voters are disgruntled they will withhold their vote, even organise election boycotts, rather than offer their votes to rival parties.

So a big question is whether the ANC is losing its status as as a self-contained party-state replete with internalised competitive democracy. Suddenly there is real contestation from external rivals, some of it over governance issues, some of it genuinely ideological. The ANC may be ceasing to be near-coterminous with the public sphere. Zuma has predicted that the ANC will rule ‘till Jesus comes’. The end of one-party hegemony, with all the stability it brings but also the exasperating impunity it confers, now seems increasingly likely to precede divine intervention.

South Africa has been in one of its long gloomy spells, and the run-up to the election did not dispel the mood. The state broadcaster is reeling from an internal rebellion and legal challenges sparked by the efforts of its maverick boss to turn it into a Zuma mouthpiece. The young are in a radical mood, threatening to close down the universities in 2017 unless university tuition is abolished. The election camapaign itself has been turbulent, sometimes vicious. There has been a great deal of localised election-related protest and violence. A ward boundary demarcation in Vuwami triggered the burning of schools and an election boycott. The ANC national leadership’s imposition of a preferred mayoral candidate on its branches in Pretoria elicited nights of arson across the city. Particularly ominous has been more than twenty politically motivated killings, including of council candidates, mostly in KwaZulu-Natal.

Against this backdrop, the election offers grounds for a more positive assssment. With electoral democracy quaking in Brazil, Turkey and Venezuela and snuffed out after a brief experiment in Egypt, here is an election in a developing country that went pretty smoothly, and losing parties seem set to accept the results. Markets have reacted calmly. A seemingly indomitable incumbent is facing an electoral penalty for political misbehaviour. Parties — including improbable coalition partners — are discussing terms of cooperation. The ANC will inevitably have to introspect. For those committed to constitutional democracy, the failure of the EFF to secure a major breakthrough will also feel like good news. Some progressives who think the DA too conservative quietly welcome the prospect of an injection of efficiency into a dysfunctional state; the left needs an effective state, after all.

There are darker possibilities. No one is quite sure what the emerging urban-rural divide portends. The ANC has fallen back on a rural base, one for which the traditionalist Zuma retains appeal. Zuma has proven a truly remarkable political survivor; rather than accept responsibility for disappointing results, he may hold the Gauteng ANC, which has opposed his leadership, responsible for the party’s setback in that urban province. Unstable coalitions of parties stretching from white conservatives to black socialists may be vulnerable to being pulled apart by a wily ruling party, itself a survivor of note as Africa’s oldest liberation movement. No one knows how the EFF will exercise its new ‘kingmaker’ role. Economic difficulties may prove intractable. Cities like Port Elizabeth may not be as easy for the DA to govern as Cape Town. And tensions between the tiers of government may sharpen.

Still, it feels like something changed on Wednesday, and for the better.