AS THE days passed and the news sunk in that Nelson Mandela, the country’s first black president, had died peacefully at his home in Houghton, a pleasant suburb of Johannesburg, South Africa reacted at first with sadness but quickly shifted to celebrating an extraordinary life. People congregated through the night outside Mr Mandela’s home, as well as at his former residence in Soweto, an urban sprawl a half-hour’s drive away. Some came to sing songs; others to light hundreds of candles in remembrance.

A very different form of memorialising could be heard during one of the many Sunday prayer services held in honour of “Madiba”, Mr Mandela’s clan name. Thabo Mbeki, who served as president after him, said a proper celebration should also include a reflection on whether the country’s current leadership was living up to the standards set by Mr Mandela and his contemporaries.

The theme of leadership was taken up by Barack Obama, the star turn at a rain-soaked memorial service held on December 10th in a football stadium in Soweto. Speaking in front of leaders from 91 countries Mr Obama said Mr Mandela set a high bar. “While I will always fall short of Madiba’s example, he makes me want to be a better man.”

The crowd greeted Mr Obama’s arrival with cheers. By contrast Jacob Zuma, South Africa’s president, was booed by sections of the stadium. It was the first discordant note since Mr Mandela’s death on December 5th. It was also an audible gauge of how far the standing of the presidency has fallen since Mr Mandela held the office. The ruling African National Congress (ANC), with Mr Zuma at its head, will next year face its toughest election campaign since coming to power in 1994.

In every dream home a heartache

In the week before Mr Mandela’s death the news in South Africa was dominated by a furore over an official report leaked to the Mail & Guardian, a weekly newspaper, concerning the 215m rand ($22m) of public money spent on Mr Zuma’s private home at Nkandla, in the province of KwaZulu-Natal. An investigation led by Thuli Madonsela, the public protector, found that Mr Zuma had derived “substantial” private benefits from publicly funded building works to make his home secure. A new swimming pool, amphitheatre and cattle enclosure were part of what was supposed to be a security upgrade.

Mr Zuma told parliament in 2012 that his family had paid for all the building work on his Nkandla home, bar the security features. The report of Ms Madonsela’s provisional findings suggests otherwise. Mr Zuma’s allies had been trying to delay publication of the report, only for a version of it to be leaked. The damage was compounded by an earlier government edict, on November 20th, forbidding the publication of photographs of Mr Zuma’s home. That was met with defiant front-page splashes of the Nkandla compound. As a consequence many more taxpayers are now aware of its grandeur.

This is one of a number of scandals that have dogged Mr Zuma. In April a private plane carrying 200 wedding guests of the Guptas, an Indian family with business interests in South Africa, was allowed to land at an air-force base near Pretoria. A link was soon made in many people’s minds between this preferential treatment and the Guptas’ close ties with Mr Zuma, though an inquiry found that he did not personally approve the landing. And Mr Zuma has never quite shaken off the taint of his close association with another businessman, Schabir Shaik, who was convicted of bribery in 2005.

The poor state of the economy has not helped his popularity. Unemployment, at nearly 25% of the workforce, is higher than it was when Mr Mandela took office in 1994. If the 2m or so adults who have given up looking for work are included, the jobless rate rises to 37%. The economy is growing too slowly to create many jobs, even as much of the rest of Africa is booming.

Angry protests about a lack of basic amenities are common, although there has been a steady increase in the reach of municipal services. The ranks of the black middle class have swollen in the years since Mr Mandela’s presidency. But many others lower down the income scale feel they have been left behind.

One of Mr Mandela’s strengths was his ability to get disparate groups to work together in a common interest. The ANC fought against apartheid in tandem with the South African Communist Party and, from the mid-1980s, the Congress of South African Trade Unions, known as COSATU. This tripartite alliance continued into government but has more recently shown signs of fracturing.

The pressing need to fix the economy puts the ANC at odds with the unions. The bulk of the unemployed are young adults, many of them unskilled. Even so it took more than three years for the government to bring to parliament a modest scheme to subsidise untried workers, because of union opposition. Education also needs urgent reform. Only 70% of pupils who stay on to take the school-leaving certificate are able to pass it. Yet teaching unions have stood firm against a no-strike rule and performance reviews.

Mr Zuma owes his position to support from the unions, and his party relies on them to get voters out on election day. Relations have been strained since Zwelinzima Vavi, a popular figure on the left and a vocal critic of ANC corruption, was suspended as general secretary of COSATU earlier this year. His allies suspect a plot to silence an awkward figure and to turn COSATU into a lapdog of the ruling party. Some unions, including the National Union of Metalworkers (NUMSA), one of the largest, want Mr Vavi reinstated. NUMSA will hold a conference later this month to decide whether to quit the federation and withdraw its support from the ruling party.

A split within COSATU could eventually lead to the formation of a breakaway labour party, an option said to be favoured by a majority of union officials. The ANC already faces a challenge to its left flank from the Economic Freedom Fighters, a new party launched in October. It is led by Julius Malema, a populist left-winger who was boss of the ANC’s youth wing until he was expelled. Mr Malema faces fraud charges that could land him in prison. He nonetheless has support from sections of the poor who feel they lack a political voice.

The vote to come

The ANC won 65.9% of the vote at the most recent general election in 2009. The Democratic Alliance (DA), a liberal party that is its nearest rival, took just 17% but is gaining in popularity. In 2014 the ANC could also lose moderate voters to Agang, another new party, led by Mamphele Ramphela, a veteran of the fight against apartheid. Losing the election seems inconceivable but the ANC is unlikely to retain such a commanding lead.

Until this week many political pundits had believed that Mr Mandela’s death would work in the ANC’s favour by reminding voters of the party’s central role in attaining racial equality and political stability. Yet it could also free its erstwhile supporters from a debt of loyalty to the party. Comparisons can be unflattering. Entreaties by the ANC at election time to “remember Madiba” might not prove a very reliable way to win votes.