The walls are going up all over Europe. In Hungary, they take the physical form of razor and barbed wire fences, like much of the old iron curtain. In France, Germany, Austria and Sweden, they are border controls temporarily reimposed, within the border-free Schengen area.

And everywhere in Europe there are the mind walls, growing higher by the day. Their psychological mortar mixes totally understandable fears – after massacres perpetrated in Paris by people who could skip freely to and fro across the frontier to Belgium – with gross prejudice, stirred up by xenophobic politicians and irresponsible journalists.

What we are seeing in 2015 is Europe’s reverse 1989. Remember that the physical demolition of the iron curtain started with the cutting of the barbed wire fence between Hungary and Austria. Now it is Hungary that has led the way in building new fences, and its prime minister, Viktor Orbán, in stoking prejudice. Europe must keep out Muslim migrants, Orbán said earlier this autumn, “to keep Europe Christian”.

He is joined in this chorus by such exemplary Christians as France’s Marine le Pen, the Front National politician who has been making the running in French politics, and Kelvin MacKenzie of the Sun. Brother MacKenzie used that newspaper’s grossly misleading presentation of its opinion poll among British Muslims to write a column under the headline: “This shocking poll means we must shut door on young Muslim migrants”.

As if Britain’s already 2.7 million Muslims were not going to have any more children. As if Europe’s tiny but deadly minority of Islamist terrorists were not here already, many of them born, brought up and radicalised on the back streets of Britain, Belgium and France.

Many Europeans are now saying their countries must re-establish border controls, even inside the Schengen area. In polls taken since the Paris massacres, about 70% of those asked in the Netherlands said the country should close its borders. Quite apart from the question of how far this actually makes people safer from terrorism, closing Europe’s internal borders risks dismantling the thing most Europeans value most about the European Union.

That is not just a rhetorical assertion. Asked in the latest EU-wide Eurobarometer poll “Which of the following do you think is the most positive result of the EU?”, the top answer, with 57% of respondents, was “the free movement of people, goods and services within the EU”. For several years, this answer has competed for top place with “peace among member states”.

Three distinct developments have led to the return of the walls. First, in Britain – and to a lesser extent in other parts of northern Europe – is the sheer scale of the movement of people inside the EU.

Those from eastern Europe have come mainly since the great enlargement of 2004, represented by the symbolic figure of the Polish plumber (now as likely to be a doctoral student or bank manager). They have been joined by another cohort from southern Europe, since the eurozone crisis started compelling Spanish, Portuguese and Greek doctors of philosophy to become waiters in London or Berlin. This has nothing to do with Schengen, which Britain is not part of, but everything to do with the freedom of movement at the heart of the EU.

Second, there is the refugee crisis. Ever more people have fled the wars, terror and economic misery that have replaced old-fashioned dictatorships (also providing terror and economic misery) across much of the wider Middle East and Africa. They risk their lives in the hands of criminal smugglers to reach Europe and the promised land at its heart – Deutschland. According to estimates from the United Nations high commission for refugees, as of 19 November 850,571 “refugees and migrants” have arrived by sea in Europe this year, while 3,485 have died or “gone missing” at sea. The Mediterranean has become a horizon of hope for the hopeless, and a watery graveyard.

Just over 50% of Mediterranean sea arrivals were from Syria, and 20% from Afghanistan. Many of them – those who make it – are 100% genuine refugees in the strict sense of having a “well-founded fear of being persecuted” in their own country. But, as the UNHCR indicates, their number inevitably includes some fleeing the intolerable material conditions that failed states create. Here, the 30-year-old, 26-country Schengen area is relevant, because once refugees have worked their way in, its lack of border controls makes it easier for them to move on to Germany – which they wanted to do even before chancellor Angela Merkel said this summer that they would all be welcome there.

Third, there are Islamist terrorists, most recently mowing down innocent concert-goers and diners-out in Paris. Most of them are homegrown in Europe, though some learn their murderer’s skills in Syria or Afghanistan. One of the Paris assassins, it seems, probably slipped into the border-free Europe of Schengen as a “refugee” with a (real or fake) Syrian passport. In any case, thanks to Schengen they could move freely to and from Brussels, assassins sans frontières.

And so, in the current bouillabaisse of European fear, stirred by demagogues in politics and media, everyone gets mixed up together: the entirely legal EU citizen-migrant, the illegal migrant from outside, the half-economic-migrant-half-political-refugee, the conflict refugee from Syria, the classic political refugee from Eritrea, the Muslim (or “Muslim”) and the terrorist. There is somehow an imagined continuum from the Polish plumber to the Syrian suicide bomber.

Meanwhile, the Polish plumbers’ new government, being made up of especially good Christians, has joined Hungary and Slovakia in saying it won’t take any of these Muslim migrants. No Samaritans please, we’re Christian.

Thus, beside the north-south divide opened up by the eurozone crisis, a new east-west divide emerges. Eastern Europe refuses the solidarity that, in other respects, it has so often called for from its European partners. South-eastern Europe is caught in between. Over the weekend, Macedonian police fought migrants on the frontier to Greece, with some 40 people injured. That’s just a tiny foretaste of what could happen in the Balkans if the EU’s external border is not made less easily passable, especially by those coming through Turkey, while northern Europe says “No more!”

I once heard Merkel – who knows what it’s like to live behind an iron curtain – muse that, in order to show young people the value of a free and open Europe, we should perhaps close the national borders for a day or two.

Well, we may yet get to try Merkel’s experiment – ironically enough, partly because of her own supremely generous miscalculation in seeming to say all refugees were welcome in Germany without first making sure that other European countries would follow where she had led.

Whether the experiment would have the desired effect is another question. At the moment, all we can say with certainty is that Europe used to be known as the continent where walls come down and is now the one where they are going up again.