Migrants and refugees walk to cross the Greece-Macedonia border near the village of Idomeni, on Tuesday.  Picture: AFP PHOTO/SAKIS MITROLIDIS
Migrants and refugees walk to cross the Greece-Macedonia border near the village of Idomeni, on Tuesday. Picture: AFP PHOTO/SAKIS MITROLIDIS

TEAR "down this wall", demanded Ronald Reagan in Berlin in 1987. "Build the wall" demands Donald Trump, the man poised to take over Reagan’s party by winning the Republican nomination for the US presidential election later this year.

While the US debates Trump’s demand for a "great, great wall" along its border with Mexico, Europe is already constructing walls to block the passage of would-be refugees.

Once again, there are some painful historical ironies. The first breaches in the Iron Curtain in 1989 came when Hungary removed the electric fencing separating it from Austria.

The decision set off a train of events that culminated in the fall of the Berlin Wall a few months later.

A quarter of a century on, Hungary has again been a trailblazer, but in the opposite direction. When Prime Minister Viktor Orban built a razor-wire fence along his country’s frontier last summer to deter would-be refugees, he was roundly denounced. A few months later, an Orban-style fence has just been built along the Macedonia-Greece border, and frontier controls are being tightened across Europe.

The journey from Reagan to Trump — from tearing down walls to putting them up — says a lot about the West’s journey from confidence to fear in the past 30 years. There are many reasons for this new demand for barriers between the West and the rest. The most obvious and direct cause is the fear of mass immigration from what used to be called the Third World. Beyond that, there is a loss of faith in the West’s ability to engage successfully with the outside world.

Even before the migrant crisis, anti-immigration parties were on the rise across Europe. They are almost certain to gain strength amid the current panic. Europe’s extreme right is already hailing Trump’s rise on the other side of the Atlantic.

Concerns about immigration from the Muslim world and terrorism have been linked in both Europe and the US — and taken to the extreme by Trump’s ugly demand for a temporary ban on all Muslims entering the US.

Beyond such fears, there is also a crumbling of some of the ideas that have underpinned western engagement since the end of the Cold War. The first principle is the promotion of a "globalised" economy through the removal of barriers to trade and investment. The second is a willingness to contemplate military intervention in trouble spots.

These two ideas were indirectly linked. The best solution to poverty and instability in the nonwestern world was (and is) routinely said to be economic growth, through increased trade and investment. But in the aftermath of the fall of the Berlin Wall, western powers also became more willing to intervene to "stabilise" failed states that had proved impervious to the magic of globalisation — from the Balkans to Africa and Afghanistan.

After 25 years of governments running these policy experiments, however, western voters seem increasingly sceptical about globalisation and liberal interventionism. After the invasions of Iraq and Afghanistan, there is scant appetite for large-scale military forays in the Middle East.

The Republican presidential candidates all pile into US President Barack Obama for "weakness" in Syria, but none is proposing the deployment of ground troops. Similarly, while anguish exists in the European Union (EU) about the influx of refugees from Syria, there is no discussion of sending troops there to end the conflict.

New trade agreements are also going out of fashion. Four years after the fall of the Berlin Wall, President Bill Clinton signed the North American Free Trade Agreement with Mexico and Canada. Now Trump is proposing to impose swingeing new tariffs on US manufacturers based in Mexico. Even Hillary Clinton, the Democratic frontrunner, is making protectionist noises. And while the EU’s political leaders claim to favour a new trade deal with the US, Europe’s left is mobilising against the idea.

Viewed from the comfort of Europe or the US, the problems of the Middle East, Africa or Central America look both frightening and insoluble. If neither trade nor military action can succeed in creating prosperity and order, then the temptation increases to create physical barriers to keep the rest of the world at bay.

Mainstream politicians in the EU and the US will still argue that building barriers is no solution. But they may find their voters have stopped listening.

© Financial Times 2016