To be free to travel. That was the dream of the millions who had lived under the Communist regimes in Eastern and Central Europe. That dream came through in summer 1989 when the Hungarian government cut the barbed wire fence that divided the country from Western Europe.

Thousands of East Germans who had made their way to Hungary crossed into Austria. It was the beginning of the end of a divided Europe. A few months later, the Berlin Wall, which symbolized the division of Europe into two ideological and physical blocs, was torn down. Europe was finally whole and united.

Then came the introduction of the EU’s Schengen system, which abolished border controls between most European Union countries. That gave Europeans from Eastern, Central, and Southeastern Europe a real sense of living in an open and seamless Europe.

But that open Europe is now in jeopardy as governments build walls against refugees, against Russia, and against the Roma. The more governments build such fences, the more they undermine the EU as an open, democratic, and free space—qualities and values that have made Europe attractive and a beacon to others.

And the more EU governments build barriers, the more they will play into the hands of authoritarian regimes in Europe’s Eastern and Southern neighborhoods. A closed and divided Europe could lose its attraction for people wanting the freedom to travel, work, and study in Europe.

Right now, Hungary is building a 12-foot-high (4-meter) fence along its 109-mile (175-kilometer) border with Serbia to prevent refugees fleeing the wars in Syria and Iraq from entering the country.

Britain is building a new security fence around the Channel Tunnel terminal in Calais, France, for the same reason.

In 2014, Bulgaria started building a metal fence along its border with Turkey to stop smugglers from bringing asylum seekers to Europe.

And during the 1990s, to prevent refugees and migrants from entering Spain, Madrid built massive walls around the cities of Melilla and Ceuta, Spanish exclaves that border Morocco.

It’s not only against refugees that some European governments are building new fortifications. Estonia announced on August 28 it was building a fence along its eastern border with Russia. Interior ministry spokesman Toomas Viks said the barrier was designed to protect the Schengen Area.

In practice, the fence is about protecting Estonia, which joined the EU and NATO in 2004, against Russia. Russia’s invasion of eastern Ukraine in 2014 and its annexation of the Crimean Peninsula has made Estonia and the other Baltic states extremely nervous about Russia’s intentions in this part of Europe.

And no wonder. Nearly a year ago, Russia kidnapped Eston Kohver, an Estonian security official who had been investigating a smuggling ring on the Estonian-Russian border. On August 24, Kohver was given a fifteen-year prison sentence.

There are walls too being built to isolate Roma communities. Slovakia has constructed more than a dozen walls to separate the country’s Roma from the locals. Back in 2009, the mayor of the Slovak village of Ostrovany built a 492-foot-long (150-meter), 7-foot-high (2-meter) concrete wall to distance the Roma from the rest of the community. The Czech Republic has also put up walls between the Roma and non-Roma local inhabitants.

In Baia Mare, Romania, the local authorities also built a wall against the Roma community. Nongovernmental organizations including the Center for Legal Resources described the wall as an initiative that belonged to the Nazi era. “The idea to separate a community with severe social problems . . . amounts to institutionalized racism,” the center stated.

Yet some EU countries—especially Germany, which expects up to 800,000 asylum seekers by the end of 2015—has refused to build new walls. Not only that. Berlin has dropped all restrictions for Syrians fleeing the war in their country. Germany is speeding up the asylum procedure process and intends to integrate those who remain in Germany as quickly as possible.

Neighboring Poland has opened its doors to Ukrainians. During 2014, Warsaw received 2,318 asylum applications from Ukraine, compared with 46 the year before. It also issued 830,553 short-term visas for Ukrainian border traders and migrant workers, compared with 720,125 in 2013, according to EUobserver.

More importantly, Poland was instrumental in obtaining a special status for the Russian exclave of Kaliningrad, which is sandwiched between Lithuania and Poland. Since 2011, with the support of Germany, Russia, and the European Commission, inhabitants of Kaliningrad have the right to travel to Poland without a visa.

Poland’s center-right Civic Platform government, particularly the former foreign minister Radek Sikorski, believed it was crucial to give these Russian citizens an opportunity to see how Poland’s political, social, and economic structures functioned.

By keeping its doors open, the EU can also encourage change. When in January 2014 Romanians were given the freedom to work in any EU country, thousands of young and old jumped at the opportunity. Their experiences were enough to convince them of the need for real change in a country mired in corruption and weak governance.

Later that year, Romanians turned up in their droves to vote for the anticorruption campaigner Klaus Iohannis. Against all the odds, he was elected president of Romania in November 2014. Open Europe was vindicated.