It is 25 years since Nelson Mandela cast his vote for the first time, in the elections crowning South Africa’s journey from apartheid to freedom. “We have moved from an era of pessimism, division, limited opportunities, turmoil and conflict,” he told reporters afterwards. “We are starting a new era of hope, reconciliation and nation-building.”

Wednesday’s general election could prove another pivotal moment for the country; but South Africa approaches the polls with only muted optimism. Jacob Zuma’s replacement as president by Cyril Ramaphosa last year ended the nation’s most troubled period since the end of apartheid. But the near decade of Mr Zuma’s rule saw not only the wasting of precious opportunities, but also the squandering or stealing of the country’s resources – including the hope of many of its citizens. Though the new president promised a cleaner and more competent government, capable of effecting the changes his country sorely needs, progress is slow. The ANC’s own officials have described this as “a referendum about rescuing South Africa”.

It is taken for granted that the ANC will win a majority again; the question is whether its vote share comes closer to the 62% it claimed at the last general election in 2014, or the 54% it took at the disastrous 2016 municipal elections, when it lost control of Johannesburg and Pretoria. If Mr Ramaphosa gains the mandate he hopes for, it will improve his prospects of pushing through reforms and restoring strength to the institutions and state-owned enterprises captured by cronyism in the Zuma years. A poor performance will weaken his hand as he struggles with rivals inside the ANC: opponents who see him as too market-minded or simply as a threat to their own interests.

The urgency of backing Mr Ramaphosa leaves the centre-right Democratic Alliance opposition facing the squeeze. More alarming are the signs of the radical left Economic Freedom Fighters party and its demagogic leader, Julius Malema, gaining ground, perhaps doubling their vote share from the 6% they received five years ago. A weakened ANC might be forced into deals with it in some provinces. Much will depend on turnout. Around one in five of the country’s 27 million registered voters describe themselves as “unmotivated”. The ANC inherited a traumatised and divided nation with extensive deprivation; such legacies are not quickly overcome. After early and remarkable strides came years of poor governance and shameful corruption. The results are grim. South Africa has the world’s highest levels of inequality, according to the World Bank. Crime rates are extremely high. Growth plummeted under Mr Zuma, and corruption soared. The nation can barely keep the lights on: the state-owned power monopoly, Eskom, owes £23bn and recently imposed rolling blackouts to prevent the grid collapsing.

More than one in four people is unemployed – and more than one in three young people. A shocking eight out of 10 fourth-graders are unable to read at an appropriate level. Maths results are similarly poor, despite high public spending on education.

One survey suggests just 22% of South Africans believe the country is going in the right direction. A strong result for Mr Ramaphosa will not change things overnight. But it offers South Africa a better chance of halting the slide and at least beginning to turn the country around. In recent years, the ANC may not have earned voters’ support. Some will be understandably reluctant to grant it. But Mr Ramaphosa needs it. And so does their nation.