At first I was going to write about the ‘Arab Problem’, because there is not a single functioning democracy in the Arab world. This week’s presidential coup in Tunisia has probably ended democracy in the one country that actually achieved it during the ‘Arab Spring’ of 2010-11.

Egypt became democratic for a while, but the same people who made the non-violent revolution in Cairo in 2011 welcomed General Sisi’s coup in 2013 because the Muslim Brotherhood candidate won the presidency. Nor did they object when Sisi’s troops then massacred an estimated 4,000 peaceful supporters of President Morsi in the streets.

In Syria and Yemen and Libya, attempted democratic revolutions led to dreadful civil wars – and now Lebanon, the closest thing to an Arab democracy for most of the past century (though always dysfunctional) is actually collapsing. In a once prosperous country, many people are close to starving, and desperate Syrian refugees are going back to live under Assad’s regime.

I guess it was Lebanon that put me on this track. We went there a few years ago because I wanted my wife to see the old Lebanon before Isis came over the mountains and destroyed it, but in the end that didn’t happen. They did it to themselves instead. Why is the Arab world cursed?

But that’s too melodramatic. The Arab world is an outlier, but not very far out. Consider the Philippines, the heir to not one but two non-violent democratic revolutions and a genuine democracy today – with a president who was legally elected five years ago and will soon leave office peacefully at the end of his one permitted term.

Rodrigo Duterte is also, by his own admission, a mass murderer whose death squads have killed thousands of people. Some were real drug-dealers and some were ‘false positives’, but as he would probably say, you can’t make an omelette without breaking eggs.

And in all that time Duterte’s public approval ratings have never fallen below 70 per cent. There are a lot of people who will admire a ‘strong’ leader, even if he is a killer.

Leaving actual killers aside, the ‘alpha male’ model of leadership is still successful in many countries that are formally democratic: Putin in Russia, Orban in Hungary, Erdogan in Turkey. Indeed even genuine democracies of long standing can be seduced by a ‘great’ leader, like De Gaulle in France. (No, I don’t know where Trump fits in this Pantheon.)

And yet at the same time we have countries that remain democratic even under great pressure, like Brazil’s democracy under attack from Bolsonaro, South Africa under Zuma (and during his recent assault on the rule of law), or Indonesia ever since Suharto. The question is not why does democracy fail or why does it succeed? It’s why does it do both?

The only people who have plausible answers are the people who study human nature: the psychologists and sociologists, of course, but more importantly (because they are getting at the root of the problem) the anthropologists, the primatologists and the ethologists. And many of them would argue that the human race has a dual heritage.

We are members of the primate family and particularly close to the chimpanzees, whose little societies are generally tyrannies run by an alpha male. The other members of the group have strong submissive reflexes to protect them from his bullying (but at the same time the subordinate males are constantly making alliances and seeking to dethrone him).

But our own species, homo sapiens, probably spent most of its career living in entirely egalitarian groups of fewer than one hundred people. They had no formal leaders, they made their decisions by consensus, and they shared almost everything. How do we know? Because all the hunter-gatherer bands who survived into the recent past lived that way.

Two heritages: the autocratic and the egalitarian. We have them both, and we can switch between them, but the default mode is probably egalitarian (i.e. democratic), because that’s the way we spent most of our human past.

When we started living in mass societies around five thousand years ago (‘civilisation’, as we called it), we had to go autocratic for a while, because you couldn’t run a group with thousands or even millions of people by consensus. There was no way for them even to include everybody in the discussion.

So five thousand years of tyranny – but as soon as we got mass communications (just printing, to begin with), the egalitarian model started coming back, because we are more comfortable with it.

We call it democracy now, and it certainly does not mean absolute equality. It does mean that the differences of wealth and power must not become too great, or the whole structure of consent will collapse and we’re back to autocracy. Nevertheless, democracy is the default mode.

Gwynne Dyer’s new book is Growing Pains: The Future of Democracy (and Work)