South Africa’s African National Congress has done the world a favour in electing Cyril Ramaphosa as its leader. The party now has a serious chance to stop the country’s slide into a mire of corruption and racially charged rhetoric. Mr Ramaphosa is almost certain to take over as the country’s president in 2019. Under President Jacob Zuma the state has been conspicuously failing. Contracts were awarded to cronies; ruling-party activists murdered each other over lucrative government positions; crooks operated with growing impunity. Mr Ramaphosa defeated Mr Zuma’s former wife, Nkosazana Dlamini-Zuma, who as a former ANC minister had plenty of political experience. But her main qualification appeared to be loyalty: Ms Dlamini-Zuma had been expected to shield her former husband from 783 counts of corruption if she had won. Her victory would have paved the way for South Africa to become a hereditary kleptocracy.

By contrast Mr Ramaphosa is the best chance for recovering the optimism South Africa radiated more than 25 years ago. The young lawyer was at Nelson Mandela’s side when he left Victor Verster prison in 1990, and was groomed to be his heir until he lost out to Mr Mandela’s eventual successor, Thabo Mbeki. Mr Ramaphosa then left politics for business. The former trade unionist ended up one of the country’s richest men and Mr Ramaphosa is now the acceptable face of South African capitalism. He also represents the yawning gulf between the country’s tiny new black elite and its poor. South Africa is one of the most unequal countries in the world and the extreme inequality is a legacy of the hideous apartheid regime. Since the demise of institutionalised segregation in 1994, inequality in South Africa has risen sharply. In spite of several reforms targeting the poorest and fighting its apartheid heritage, race is still a key determinant of differences in income, education, job opportunities and wealth. The richest 10% of South Africans are largely white. This group earns more than 60% of national income and enjoys income levels comparable to Europeans, while the bottom 90%, almost all of whom are black, live among the poorest lives in Africa.

With a ringside view of the economy, Mr Ramaphosa knows that trade liberalisation in the 1990s enriched the country’s richest citizens while exposing the most vulnerable. With a background running both the National Union of Mineworkers and mines as a businessman, he is also aware that the rapid growth on the back of the global commodities boom a decade later proved a jobless phenomenon. Unemployment in South Africa is running at more than 25%, while one in two young people do not have a job. Social harmony – in a nation with one of the highest murder rates in the world – is badly frayed. It should surprise no one that Mr Ramaphosa’s programme is a redistributionist one, to boost economic growth and provide jobs and schooling. South Africa is its continent’s biggest economy and needs to recover its moral authority, which the rainbow nation gained in its birth but has been lost in the tawdry dealings of the present.

Mr Ramaphosa will have to navigate a domestic politics that on the right sees the Democratic Alliance rising in popularity – it now governs the country’s three most important cities – and on the left is dominated by the noisy populism of the Economic Freedom Fighters. Within the ANC he faces challenges too from regional party kingmakers who unlike him have come to power under the patronage politics of recent years rather than being immersed in the struggle to end white minority rule. Political debate needs political philosophies. At the root of the ANC’s problem is that it was a broad-based liberation movement that transformed itself into a political party without developing a coherent ideological basis for governing. Mr Ramaphosa represents the best chance since his mentor Mr Mandela departed politics to fix that.