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.

Our future, too, may be perilous if we ignore this warning.

Whatever Trump does in office, the stark reality is that America has elected a bigot and demagogue with a deep contempt for women. When he takes over, the world will enter a time of great danger because we will have no idea whether a president who ignored the constraints of decency when he was a candidate will respect them in office.

And since the future is so uncertain, South Africa’s best response to Trump’s election is to learn the lessons of its causes.

Inequality

The first reason why America’s voters (or almost half of them since Trump did not win a majority of votes) 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. The effect has been famously measured by Nobel laureate Angus Deatonand his wife Anne Case, who found that the new realities were playing havoc with the health and wellbeing of working class whites.

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 MIT political scientist Roger Peterson has shown that right-wing authoritarian movements grow when groups who enjoy power and privilege believe that it is threatened by other groups. They react by resenting the upstarts who may knock them off their perch – American white workers fit his theory.

The lesson for South Africans is that this was caused by an economic approach which has widened inequality by dumping protections for workers and the poor. Angry white workers blame globalisation. In fact the real culprit is policies which have torn up the deal which spread the benefits of growth more fairly. The South African parallel is the continued unwillingness or inability of key economic actors to negotiate a growth path which will include many in the economy.

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.

When Barack Obama was elected, commentators waxed lyrical about a post-racial America which had ditched its prejudices. It did not take very long to show how off the mark this was.

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.

Again, Peterson explains this. Many American whites believe the America they and their parents knew is disappearing as racial minorities become more numerous and more mainstream – whites are projected to become a minority in the next few decades. Obviously many whites do not feel this way but the resentment is growing: many who did not vote against Obama chose Trump.

Again there is a parallel with South Africa. In both countries, elites duck the racial issue which is its most serious divide. The fact that Obama was harried because he was black was ignored in the mainstream – every explanation was advanced expect the obvious one.

South Africans are constantly urged to “move beyond race” when it continues to divide the country. In the few years before 1994’s first democratic election, elites in the country took race seriously – once it had a democratic constitution and a Truth and Reconciliation Commission, the problem was declared solved and they lost interest. But it wasn’t – racial division and anger remain the country’s most serious challenge, threatening its universities and obstructing its attempts to grow as an economy and a society.

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.