In this age of noisy populist movements, many commentators tend to see anti-immigration sentiment as a threat to democracy itself. “The Muslim ban will make us less safe; worse, it erodes our democracy,” wrote retired CIA officer Glenn Carle last year after President Trump tried to restrict entry to the United States by citizens from seven majority-Muslim countries. In Britain, the archbishop of Canterbury associates Trump and Brexit, phenomena largely driven by opposition to immigration, as part of a “nationalist, populist or even fascist tradition of politics.”

And in his new book, “Go Back to Where You Came From: The Backlash Against Immigration and the Fate of Western Democracy,” Sasha Polakow-Suransky argues that restricting immigration inevitably leads to the death of democracy itself.

But do these arguments really make sense? The conflation of liberal values (in the classical sense of the term) with a liberal stance on immigration mistakes a policy preference (one I happen to share) for a first principle. An economic migrant wanting to enter a country does not have a “right” to do so in the same way that a citizen of that country has a right to free speech. If 99.9 percent of a country’s population wanted to abridge the free speech rights of a particularly unpopular citizen, or deny him legal representation before a court of law, it would be a clear violation of liberal democratic principles to follow through on their desires.

The same can hardly be said of policies that restrict (or even shut down entirely) immigration. A liberal immigration regime is not a prerequisite of a democratic society, yet such a society is almost unimaginable without press freedom, judicial independence or representative government. If anything, it’s the failure of elites to recognize this distinction that may ultimately lead to the death of democracy.

Leaders such as Trump, Marine Le Pen and Viktor Orban should worry supporters of liberal democracy not for their opposition to immigration but rather because they are hostile to basic liberal values, including pluralism, a free press, separation of powers and democratic alliances.

Immigration policies widely derided as “populist” are actually quite popular. What “erodes our democracy” is not Trump’s ban — however misguided — but criminalizing the policy preferences of a democratically elected president.

Today, many on the left seem to believe that the very concept of borders is immoral and should not exist. Meanwhile, in the debate over so-called sanctuary cities, activists egg on municipalities to defy federal immigration officials in open defiance of the rule of law.

Unable to achieve a compromise that would grant legal status to the 11 million people currently residing in the country illegally, some now advocate piecemeal policies that would eliminate any meaningful distinctions between citizens and noncitizens. Last year, the City Council in College Park, Md., barely voted down an initiative to grant noncitizens the right to vote in local elections. A commentator on NBCNews.com goes a step further, arguing that all immigrants be given the vote in elections at every level.

Liberals who seriously want to defend liberal democracy should stop condemning those who disagree with them on immigration. Uncritical support for wide-open borders is a major reason for the collapse of social democracy in Europe, as traditional center-left voters have flocked to populist, anti-immigration parties, which are often the only ones offering reasonable limits on immigration.

This has been the case in Germany, where the anti-immigrant Alternative for Germany is the biggest opposition party in parliament, and Italy, where voters flocked to parties promising to deport illegal immigrants. Voters don’t necessarily support these parties’ worrisome views on Russia, judicial independence, press freedom or NATO, but they tend to give much higher priority to concrete, migration-related issues (including crime and national identity).

Addressing such concerns doesn’t mean that those of us who favor immigration must automatically approve sealing off all borders. It does mean that we need to make some serious concessions. For if every move to restrict immigration or strengthen borders or discourage further migratory waves is portrayed as a concession to fascism, then the only people who benefit will be fascists. Liberal democracy has enough enemies at the moment. Liberal democrats should stop making new ones.

James Kirchick is a visiting fellow at the Brookings Institution.

Special to The Washington Post