SOUTH AFRICA has had three finance ministers in less than a week. The first, Nhlanhla Nene, a respected technocrat, was “redeployed” after he objected to wild spending plans. One clash involved the chairman of South African Airways, Dudu Myeni, who wanted the state carrier to buy aeroplanes via an unnamed middleman. Local press speculated that Ms Myeni was one of the president’s mistresses. Jacob Zuma issued a public denial. He replaced Mr Nene with a nonentity: a backbench MP and former small-town mayor called David van Rooyen. The rand promptly plummeted 9%. Over the weekend Mr Zuma dropped Mr van Rooyen and replaced him with Pravin Gordhan, a safe pair of hands who has done the job before. Problem solved? Not by a long shot.

Since Mr Zuma came to power in 2009, South Africa’s finances have grown ever more precarious. The budget deficit is 3.8% of GDP. Public debt has ballooned from 26% to almost 50%. This month Fitch, a credit-rating agency, downgraded the country’s debt to a notch above junk. Many analysts expect another downgrade in 2016. That could be disastrous (see article). Many of the funds that hold South African debt are barred from owning junk. If South Africa is downgraded again, investors will rush to dump its paper. The country’s interest bill will soar, crowding out other public spending. Mr Zuma seems only dimly aware of the danger. In a speech after he sacked Mr Nene, he praised Robert Mugabe, Zimbabwe’s despot, boasted that Africa is the biggest continent in the world (it is not) and failed to mention the small matter of his country’s credit rating.

Since the end of apartheid in 1994, South Africa has been ruled by the party of black liberation, the African National Congress (ANC). At first the ANC embraced open markets and fiscal discipline. Under Mr Zuma, however, the country’s macroeconomic stability, which underpins all the ANC’s social programmes, is imperilled. The commodity bust is partly to blame, but the main problem is the way Mr Zuma governs.

He has acted as if the treasury were a bottomless purse with which to pamper ANC voters. Since 2006, the number of public servants has swollen by 25%, even as private-sector employment has fallen. South Africa now spends 40% of its budget on pay; similar countries spend 25% or so. Mr Zuma has also presided over a steady spread of corruption. Officials take kickbacks. Nurses steal from clinics. Union bosses sell public jobs to the highest bidder, leaving schools with teachers who draw salaries but never show up. A recent OECD study of maths and science scores in 76 countries placed South Africa second from bottom, below many poorer countries.

And Mr Zuma has fostered the growth of a peculiarly self-righteous form of cronyism. The ANC favours “black economic empowerment”, a policy that purports to right the wrongs of apartheid by nurturing a new class of black businesspeople. The state gives preference to black-owned contractors; private firms are leaned on to transfer shares to blacks. In practice this has enabled senior members of the ruling party to give juicy contracts to their cousins and grab slices of enterprises created by other people. ANC bigwigs have become fabulously rich with minimal effort. Ordinary black South Africans suffer, however, because all this scares off investors and retards economic growth, which will barely surpass 1% this year—slower than population growth and pathetic for an emerging market. Unemployment is 35%. Crime is widespread and stunningly violent. Unless things improve there is a risk that even more skilled South Africans, who pay most of the taxes, will emigrate. This is especially true of the 9% of the population who are white, many of whom have family ties abroad.

The rot starts at the top

Does Mr Zuma’s decision to sack his nonentity finance minister signal that he is belatedly serious about the economy? It would be nice to think so, but the omens are not good. First, Mr Zuma’s view of economics is unconventional. Last week he declared that the value of a commodity should be determined not by supply and demand, but by the labour that went into producing it. Second, it is hard to imagine Mr Zuma rooting out cronyism when, by his own example, he seems to encourage it. He used public money to build himself a palace in his home town. Before he became president, he faced 783 charges of corruption, fraud, money-laundering and tax evasion, though these were all dropped and he denies any wrongdoing. Under him, politicians who steal are seldom punished.

South Africa deserves better. The liberal Democratic Alliance, which governs the Western Cape reasonably well, may win control of some big cities in 2016. Yet the ANC’s grip on national power remains strong. Whether Mr Zuma’s grip on the ANC can survive an economic crisis, however, remains to be seen. In 2008 the party declared his predecessor, Thabo Mbeki, unfit to govern, forcing him to resign. This is unlikely to happen again. But if it does, the deputy president, Cyril Ramaphosa, would be a better steward of the economy. Though his business career owed much to his political connections, he is shrewd and competent. And South Africa needs a steady hand if it is to pull back from the precipice.