What kind of a president would build a wall to keep out families dreaming of a better life? It’s a question that has been asked world over, especially after the outrage last week over migrant children at the American border. Donald Trump’s argument, one which his supporters agree with, is that the need to split parents from children at the border strengthens his case for a hardline immigration policy. Failure to patrol the border, he says, encourages tens of thousands to cross it illegally — with heartbreaking results. His opponents think he is guilty, and that his wall is a symbol of America closing in on itself.

In fact, building a wall would make Trump the norm, not the exception. Those who denounced as crazy Trump’s campaign promise to build a wall did not appreciate how popular such a policy would be, nor how common. Nation states have started to matter again, and people care about borders — not just on the Texan side of the Rio Grande. Today more than 65 countries now wall or fence themselves off from their neighbours — a third of all nation states. And this is no historical legacy. Of all the border walls and fences constructed since the second world war, more than half have been built this century.

It wasn’t supposed to be this way. Thirty years ago a wall came down, ushering in what looked like a new era of openness. In 1987 Ronald Reagan went to Berlin and called out to his opposite number in the Soviet Union, ‘Mr. Gorbachev — tear down this wall!’ Two years later it fell. In those heady times some intellectuals predicted an end of history. History had other ideas.

This does not mean Hillary Clinton was wrong when in 2012 she predicted that in the 21st century ‘nations will be divided not between east and west, or along religious lines, but between open and closed societies’. Still, so far she is not right either.

At the turn of the century migration sped up and that began to tear down hopes of a borderless world. We’ve grown used to the new barriers that European nations have erected — between Greece and Turkey, for instance, or Serbia and Hungary, or Slovenia and Croatia — but many more are being built. To the east, Estonia, Latvia and Lithuania are working on defensive fortifications on their borders with Russia. These measures are more to do with a perceived Russian military threat than with mass migration, but they are part of the overall trend — reinforcing the physical boundaries of the nation state — and contribute to the hard border which runs from the Baltic to the Black Sea.

Saudi Arabia has fenced off its border with Iraq. Turkey has constructed a 700-mile concrete wall to separate it from Syria. The Iranian/Pakistan border, all 435 miles of it, is now fenced. In Central Asia, Uzbekistan, despite being landlocked, has closed itself off from its five neighbours.

On the story goes, through the barriers separating Brunei and Malaysia, Pakistan and India, India and Bangladesh and so on around the world. The India/Bangladesh fence is instructive in showing us how the era of wall-building is not just about people in the developing world moving to the industrialised nations. The barrier runs the entire length of the 2,500-mile frontier and is New Delhi’s response to 15 million Bangladeshis moving into the Indian border states this century. This has led to ethnic clashes and many deaths.

Wherever this mass movement of peoples happens at pace it seems to assist a retreat into identity. Almost all recent election results in Europe bear this out. Concurrent is the rise of extremes.

Following the Dutch and French elections in 2016, there was an assumption in the media that Europe had halted the rise of the right. This was a complacent attitude at odds with the evidence. In the Netherlands, Geert Wilders increased both vote share and parliamentary seats. The French election in particular was used to show that President Emmanuel Macron’s ‘open society’ model was triumphing against the ‘closed society’ model of his opponent Marine Le Pen. However, what Le Pen achieved as to almost double the far-right vote to 34 per cent, compared with when her father (Jean-Marie) stood against President Jacques Chirac in 2002. He won 5.25 million votes; last year 10.6 million voters supported the Front National. Austria’s choice of president, the entry of the AfD into the Bundestag, Hungary’s right-wing landslide and Italy’s new government all point to a rightward direction of travel in European politics. In all cases, concern about mass migration is among the driving forces. Voters are worried and tend to support parties which voice their concerns.

This is true of Trump’s presidential victory and public support for his wall. To an extent we are dealing with psychology here. It is not true to say that ‘walls don’t work’ — some do, some don’t — but they do give the psychological impression, via their physicality, that ‘something is being done’. They address concerns about migrant invasions in a way that rhetoric about ‘getting tough’ on immigration does not. Hence, despite the evidence, many Americans appear to believe still that the wall with Mexico will be built and that it will work. This belief ignores the fact that there is a treaty between the two countries in which both agree they will not build on the Rio Grande flood plain, and that despite (somewhat half-hearted) efforts by the President, Congress has not agreed to fund his plan.

The headlines afforded Trump’s ‘anti-immigrant’ stance detract from the bigger picture. It is easier to have the big bad wolf to huff and puff against than it is to see him as part of a global phenomenon. Concentrating on the Donald’s evils allows the Mexican government to quietly get on with deporting far more Central Americans from its country each year than does the United States. Granted, the US assists Mexico in this, but last year Mexico deported 165,000 central Americans, while the US expelled 75,000. The tales of hardship crossings, exploitation and human rights violations on the almost ignored Mexican/Guatemala border are, if anything, more harrowing than those on the border 900 miles to the north.

The walls and fences built this century mirror the divides which have also grown in political discourse and especially on social media. A decade ago Mark Zuckerberg believed social media would unite us all. He now says ‘the world is today more divided than I would have expected for the level of openness and connection that we have’. In some ways he was right — we are more connected and there are many positive aspects to this, but what surprised him is how many of us use that connectedness to abuse the ‘other’. The internet has allowed us to divide into social media tribes howling into a void, an echo chamber or across the divides at each other. This level of abuse has crawled out of the worldwide web and into worldwide politics — Mr Trump being the best-known beneficiary.

The Chinese led the way in great wall- building and are becoming world leaders in using the internet as a wall. We all know of the ‘great firewall of China’, which they call the ‘golden shield’. This is intended to block the outside world from infecting the Middle Kingdom with harmful ideas such as democracy. Less well known are the internal firewalls within China.

Beijing likes to ensure that people in the restless province of Xinjiang, a Turkic-speaking Muslim state, cannot easily converse with those in Tibet. Both have independence movements, and allowing them to form cybernetworks might be detrimental to the unity of the People’s Republic, so they have extra firewalls around them. China is probably the world’s leader in using new technology to build virtual walls. The Russians are the leaders in working inside other countries’ social media to sow division and use disinformation to muddy debate. It used to be argued that the internet would undermine the nation state as citizens of the world simply bypassed governments in a free-flow exchange of ideas and information. Again, this may come true, but it might also be that as the years pass more legislation will be enacted allowing the state to control the net.

We seem to have always divided ourselves one way or another. From the moment we stopped being hunter-gathers about 12,000 years ago, we began to build walls. We ploughed the fields and didn’t scatter. Instead we waited around for the results. More and more of us needed to build barriers: walls and roofs to house ourselves and our livestock, fences to mark our territory, fortresses to retreat to if the territory was overrun. The age of walls was upon us and has gripped our imagination ever since. We still tell stories of the walls of Troy, Constantinople, the Inca in Peru and many others.

The new wall-building is driven by recent events. The cry ‘tear down this wall’ is losing the argument against ‘fortress mentality’. It is struggling to be heard, unable to compete with the frightening heights of mass migration, the backlash against globalisation, the resurgence of nationalism, the collapse of communism and the 2008 financial crash.

On the other hand, our ability to cooperate, to think, and to build, also gives us the capacity to fill the spaces between the walls with hope and to build bridges.

However, first must come an acceptance of the situation, and a very open and honest discussion of how we got here. Key to that is the debate on migration and identity and that requires a reaching out across the divides on all sides.

Of all the border walls built since the second world war, more than half have been constructed this century

Tim Marshall is the author of Divided: Why We’re Living In An Age Of Walls, Elliott and Thompson £16.99.