Nicolas Sarkozy, the French president, sure knows how to play the populist card, and an anti-European one at that.

Desperate to improve his standing in the opinion polls before next month’s French presidential election, he is doing everything possible to win over voters. And that includes tapping into the space occupied by euro-skeptics and far-right sympathizers.

Mr. Sarkozy’s latest ploy is attacking the Schengen treaty that allows the vast majority of Europe’s citizens to travel across the bloc without any passport controls.

“At a time of economic crisis, if Europe’s doesn’t pick those who can enter its borders, it won’t be able to finance its welfare state any longer,” Mr. Sarkozy told thousands of supporters during an election rally earlier this month. Then came the sting. “The Schengen Agreement can no longer respond to the seriousness of the situation. It must be revised,“ Mr, Sarkozy said.

It is possible that once the election is over, Mr. Sarkozy’s assault on Schengen might be forgotten. But the fact that the president of France dared to question the bedrock of European unity shows how far he is prepared to go to win votes and how far he is prepared to disregard a major achievement of European integration.

Because that’s what Schengen is.

More than the euro, Schengen has had a direct, unambiguous, and positive impact on people’s lives. The fact that most of the European Union’s citizens can drive from the eastern borders of Poland to the French Riviera without frontier controls has been one of the great crowning achievements of European unification. It seems so natural today that it is easy to forget what travelling in Europe was like before the Schengen agreement was signed in June 1985.

Anyone crossing by foot, by car, or train from Germany into Holland, or from Spain into France could undergo intrusive searches. The queues were long, the waiting time could run into hours. Border guards were armed and could force travelers to open their suitcases.

Remember the joyous celebrations throughout the countries of Eastern and Central Europe when they became members of the Schengen treaty in December 2007. For the tens of thousands of Poles who had been commuting to Germany and Sweden, Belgium and France, to work, returning home—by car—as often as possible, becoming part of Schengen meant something very special. Of course, joining the EU was special. It meant Eastern and Central Europe were being integrated into the bloc. It brought the countries recognition as democracies, political say in Brussels, and access to the Union’s funds.

But joining Schengen had a much more tangible meaning. It made the unification of Europe a reality because it meant the elimination of borders.

Doesn’t Mr. Sarkozy realize that?

Didn’t the Danes see it when last year the then conservative coalition, relying on the support of a nationalist party to remain in power, re-imposed border controls?  The argument at the time was that open borders facilitated all kinds of smuggling.

Denmark was not only castigated by the European Commission, which took a tough line against Denmark’s decision. Germans also took a very dim view of Denmark’s decision. They reacted where it hurts most. Money. They cancelled holidays in a country that is highly popular for many Germans and went elsewhere.

All that being said, there is another side to Schengen, a far darker one.

In a curious contrast to what Mr. Sarkozy has been implying, Schengen actually has served as a tool to European governments to keep out non-EU citizens. Fortress Europe, in that sense, is real.

During the height of the Arab Spring, one of the EU’s main worries was how to keep out refugees fleeing the fighting in Libya. People fleeing the terrible bloodshed in Syria aren’t finding any open doors in Europe, either.

The populist rhetoric was all about keeping economic immigrants out instead of providing shelter for those seeking safety. It would have cost little to set up temporary camps in Europe, or help Tunisia cope with the thousands of Libyans who had fled across the border. Instead, a kind of siege mentality is taking hold. That is what Poland in particular fears: That the more populist Europe becomes, the more it will become more inward looking in a way that will make it less open to its Eastern neighbors. 

As globalization marches on and Europe grows dependent on bringing in young, mobile, and educated people, surely the EU’s strategy should be focused on making Schengen more flexible.

So, Mr. Sarkozy, please listen: Europe doesn’t need borders reestablished, it needs its border regime lightened. Anything else is certain to damage its future.