POPULISTS have a new grievance. For many years, on both sides of the Atlantic, they have thrived on the belief that a selfish elite cannot—or will not—deal with the problems of ordinary working people. Now populists are also feeding on the fear that governments cannot—or will not—keep their citizens safe.

In America this week, after a couple who had pledged allegiance to Islamic State (IS) murdered 14 people in San Bernardino, California (see article), Donald Trump called for a “total and complete shutdown” of America’s borders to Muslims. Earlier, the front-runner in the race for the Republican presidential nomination had proposed closing mosques and registering American Muslims. “We have no choice,” he said.

In France, the counterpart to Mr Trump is the far-right National Front (FN). In the first round of regional elections on December 6th, after the IS terrorist assault on Paris last month, the FN narrowly gained the largest share of the national vote (see article). It was ahead in six of the 13 regions. The FN’s leader, Marine Le Pen, and her niece each polled over 40%.

Mr Trump and Ms Le Pen are not alone. Support for the populist right in America and parts of Europe is unparalleled since the second world war. Against the backdrop of terrorism, these fearmongers pose a serious threat to the openness and tolerance that Western societies take for granted.

Angry old men

Even before recent attacks, right-wing populists were making their mark. Since October Mr Trump, and Ted Cruz and Ben Carson—less offensive, but only marginally less extreme—have together consistently won the support of over 50% of Republican voters in polls. In Europe populists are in power in Poland and Hungary, and in the governing coalition in Switzerland and Finland (and that is not counting the left-wing sort like Syriza in Greece). They top the polls in France and the Netherlands, and their support is at record levels in Sweden. Ms Le Pen is likely to reach the second round of France’s presidential election in 2017. Just possibly, she might win.

Populists differ, but the bedrock for them all is economic and cultural insecurity. Unemployment in Europe and stagnant wages in America hurt a cohort of older working-class white men, whose jobs are threatened by globalisation and technology. Beneath them, they complain, are immigrants and scroungers who grab benefits, commit crimes and flout local customs. Above them, overseeing the financial crisis and Europe’s stagnation, are the impotent self-serving elites in Washington and Brussels who never seem to pay for their mistakes.

Jihadist terrorism pours petrol on this resentment—and may even extend populism’s appeal. Whenever IS inspires or organises murderous attacks, the fear of immigrants and foreigners grows. When the terrorists get through, as they sometimes inevitably will, it highlights the ruling elite’s inadequacy. When leaders, in response, warn against slandering Islam and focus on gun control, as Barack Obama did in a speech from the Oval Office on December 6th, populists dismiss it as yet more political correctness.

Populist ideas need defeating. Mr Trump compares his plan to the treatment of Japanese-Americans during the second world war. Just so: as Ronald Reagan’s government later acknowledged, FDR’s policy was “race prejudice”. A xenophobic revival would do America immense harm—and IS immense service. Ms Le Pen would erect ruinous economic barriers and cause mayhem by proposing to leave the euro. Hungary’s prime minister, Viktor Orban, has vowed to build an “illiberal state” and looks to Vladimir Putin’s Russia as a model. Even when they are not in power, populists warp the agenda.

Nobody should underestimate how hard it is to take the populists on. Some mainstream politicians dismiss their arguments by labelling them fascist or extremist. Yet such disdain risks suggesting that the elite is uninterested in the real grievances that populists play on. Others try to borrow the populists’ less-offensive clothes by promising, say, to deny benefits to migrants rather than build border fences. Yet such xenophobia-lite often just validates populist prejudices.

The long struggle

Is there a better way? This newspaper stands for pretty much everything the populists despise: open markets, open borders, globalisation and the free movement of people. We do not expect to convince populist leaders of our arguments. But voters are reasonable—and most of them would sooner hear something more optimistic than rage against a dangerous world.

Part of the answer is to draw on the power of liberal ideals. New technology, prosperity and commerce will do more than xenophobia to banish people’s insecurities. The way to overcome resentment is economic growth—not to put up walls. The way to defeat Islamist terrorism is to enlist the help of Muslims—not to treat them as hostile. The main parties need to make that case loudly and convincingly.

Politicians also need to deal with the populists’ complaint that government often fails its citizens. Take the threat to security. Mr Obama’s reluctance to deploy more troops against IS’s “caliphate” in Syria and Iraq does not convince most Americans, including many present and former military commanders. Europe’s spooks and law-enforcement agencies fail to share information. The EU needs to manage the flow of people at the border, allowing those who qualify as refugees to work and thus help them to absorb Western values (see article).

To imagine better government across all of economic and security policy is a counsel of perfection. But even small improvements will count if they are allied to a robust defence of the West’s Enlightenment values.

The choice ultimately falls to voters, most of whom do not subscribe to right-wing populism. Mr Trump has the backing of just 30% of the 25% or so Americans who say they are Republican. But the turnout for primaries and caucuses in America is less than 20%. The turnout in France was just under 50%. The way to beat the populists is at the ballot box. The moderate majority has a responsibility to show up and put a cross next to candidates who stand for openness and tolerance.