Washington • In affluent neighborhoods around Washington, New York and Los Angeles — and, for that matter, Paris, London and Berlin — it’s common to denounce nationalism, to disdain supposedly mindless, angry populists, and to praise those with an open-minded, cosmopolitan outlook. Note that those involved are praising themselves.

Lord knows, there is much to fear about nationalism. Extreme nationalism has led to fascism, war, the persecution and slaughter of minorities, and the undermining of democracy in the name of national unity. In regularly denouncing the give and take of party politics as a force dividing and corrupting “the people,” nationalists can open the path to rule by ruthless, cynical autocrats.

But those who would save liberal democracy (along with anyone who would advance a broadly progressive political outlook) need to be honest with themselves and less arrogant toward those who currently find nationalism attractive.

Across the democratic world, an enormous divide has opened between affluent metropolitan areas and the smaller cities, towns and rural regions far removed from tech booms and knowledge industries.

Globalization married to rapid technological change has been very good to the well-educated folks in metro areas and a disaster for many citizens outside of them. This is now a truism, but it took far too long for economic and policy elites to recognize what was happening. It should not have taken the Brexit referendum victory, the election of Donald Trump and the nationalist surges in Hungary, Poland, France, Germany and Scandinavia to bring home the cost of these regional inequalities.

This is a central theme of the political writer John Judis' excellent and compact book, "The Nationalist Revival," published this fall. A person of the left, Judis specializes in speaking truth to liberals, something he also did in his earlier "The Populist Explosion." He thinks it's important for progressives to understand why so many are drawn to Trump and the far right in Europe.

Judis sees the rise of nationalism as a reaction to "the illusions and excesses of globalization." By unleashing footloose capital and undercutting national and even international efforts to regulate the economy in the public interest, globalization "is incompatible with social democracy in Europe or with New Deal liberalism in the United States."

He proposes a useful distinction between "globalism" and "internationalism." He's against the first but for the second. Globalism, Judis argues, "subordinates nations and national governments to market forces or to the priorities of multinational corporations." Internationalism, on the other hand, accepts that nations may sometimes have to "cede part of their sovereignty to international or regional bodies to address problems they could not adequately address on their own."

Trumpism is mistaken because it refuses to acknowledge that pooling sovereignty with other countries can actually make a nation stronger. But critics of Trumpism need to recognize the ways in which globalism undercuts the rights and fortunes of large numbers of democratic citizens. The dispossessed often turn to nationalism for relief against their own sense of powerlessness.

Thinking about powerlessness is also important for understanding the backlash against immigration. There is good reason to be horrified at the xenophobia and racism underlying Trump's cruel policies toward immigrants and refugees. Opposing what Trump is doing is a moral imperative.

But there is nothing new (or necessarily indecent) about citizens saying that nations have a right to control their borders and to decide what levels of immigration they want to accept at any given time. In truth, almost all of Trump's critics believe this, and proposals for immigration reform that have advanced in Congress have always provided for border security and set limits of some kind on immigration flows.

The challenge for the left and for all advocates of humane immigration policies is to move the debate from angry abstractions about "open borders" and toward a practical engagement with basic questions:

What level of immigration is optimal at this moment for the nation as a whole? What will it take to reach a consensus for creating a path toward citizenship for immigrants who are here illegally? And how do we build a stronger civic culture that acknowledges the rights but also the duties of the native born and immigrants alike?

For a variety of reasons I prefer to defend patriotism rather than nationalism. But words aside, friends of liberal democracy need to accept that worrying about the decay of national sovereignty does not automatically make someone a reactionary. And they should insist at the same time that American patriotism and the defense of constitutional democracy are one and the same.

E.J. Dionne

E.J. Dionne is on Twitter: @EJDionne.