David A. Andelman, visiting scholar at the Center on National Security at Fordham Law School and director of its Red Lines Project, is a contributor to CNN where his columns won the 2017 Deadline Club Award for Best Opinion Writing. Author of "A Shattered Peace: Versailles 1919 and the Price We Pay Today," he was formerly a foreign correspondent for The New York Times and CBS News in Asia and Europe. Follow him on Twitter @DavidAndelman. The views expressed in this commentary are his own.

(CNN) Donald Trump is presiding over a sunset to democracy that is spreading across the world, eradicating much of the spirit of globalism that once was a beacon to freedom, free trade and democratic values.

The crest of this wave -- the battle over a nation's ability to choose who will be able to settle within its borders -- is also sweeping across traditional democracies as never before, with newly elected governments in such longstanding bulwarks of freedom as Germany and Italy suddenly poised on the brink of resistance to a continuing influx of immigrants, largely from the Middle East and Africa. This movement has gained power and affirmation by the Trump vision of preservation of frontiers and traditional domestic values.

As Trump told a White House gathering on Monday, the transformation of the American immigration system should be "something maybe even for the world to watch," adding that "The United States will not be a migrant camp and it will not be a refugee holding facility. ... We want a safe country, and it starts with the borders. And that's the way it is. ... A country without borders is not a country at all."

The European Union, of course, is for the moment at least, a continent largely without borders, and indeed Trump pointed out that "if you look what's happening in Europe ... we can't allow that to happen to the United States."

The welcoming of others -- or, like Europe, maintaining a free flow of people -- is one key element of globalism. But nationalism is beginning to rear an ugly head in many of these regions that still espouse democracy, but are apparently seeking to move closer to a nationalist model.