We don’t know what a Donald Trump presidency will mean for South Africa. But what South Africans should know is that America has just elected its most dangerous president ever because it has not dealt with two problems the country has also ducked: inequality and race.

Inequality.

The first reason why America’s voters chose the unthinkable is inequality. Trump was not elected by those who have most suffered from American inequality – the racial minorities who mostly voted for his opponent. But he was helped over the line by a swing away from the Democratic Party by white working class voters – this was probably why he won the “rust belt” states of the mid-West.

While white workers are better off than their black and Hispanic counterparts, they have taken a massive economic hit over the past decades – wages have stagnated or declined and jobs are no longer secure. Their world, in which they could rely on a steady job with rising pay, has collapsed.

These workers are not nearly at the bottom of the pile – if they were, they may have blamed the economic system. But they have lost their relative privilege and so they blame those below them in the pecking order – racial minorities and immigrants.

The racial divide.

The second reason for Trump’s triumph was that America’s racial divide remains probably the key driver of its politics.

Workers were not the only white voters who were important to Trump: he won among almost every group of white voters, including college educated men who were said to hold him in contempt. The only white group to reject him was college educated women and then by a small margin. So many white voters for whom Trump showed contempt were willing to vote for him – and the reason is surely that they wanted a president who would protect whiteness.

For eight years, the Republican Party and its white support base waged an unceasing war against Obama, even when he introduced measures such as health insurance which massively benefited poor whites. As research by the pollster Stanley Greenberg showed, the key motive was Obama’s race.

The threat posed by inequality and racism.

Could South Africa’s failure to address inequality and race threaten the country’s politics too? It already does.

The patronage politics which plagues the African National Congress has threatened the National Treasury and has produced the politics of “state capture” which is a symptom of the country’s inequalities. South Africans who are included economically don’t need political bosses to hand them goodies – the many who are still excluded do. This fuels those politicians who want to use public money to build political support.

Racial divides also give the patronage politicians a ready excuse: they can claim that taking money from the powerful Gupta family, who are close to South Africa’s president Jacob Zuma, is a rebellion against white capital. A growing chorus from this faction insists that they are being prevented from taking over the National Treasury not by a concern to protect public money but at the bidding of white tycoons who do not want black people to become rich.

And they have, particularly on the country’s campuses but elsewhere too, produced a brand of politics which justifies violence and bullying directed mainly at black people and – you guessed it – women on the grounds that privileged whites are determined to silence black people seeking to express themselves.

Here, ignoring inequality and race may not ensure the election of a dangerous president – although it could do that at the next ANC conference. But, as in the US, South Africans pay a price for it. It poses a constant threat to the economy and society which the country can only tackle if South Africans negotiate a more equal economy and show the same willingness to address race and racism as some did 25 years ago.