The United States has been at war with ISIS for more than a year, and with Islamic extremism for nearly a decade and a half. But beyond defending the homeland against terrorism, U.S. leaders have not offered a compelling answer to this vital question: What is it that America is fighting for?

The question has taken on new urgency as electoral politics has driven a surge of illiberal populism, not only in the United States but in many European democracies. America will not defeat the grave challenge it faces by retreating from its core principles. When societies fall out of touch with their most elevating, unifying beliefs, they decline into cynicism and sloth. This is how states and civilizations decay and disappear.

From the very beginning, the unifying American principle has been freedom. For almost two and a half centuries, Americans have held these truths to be self-evident: that all people “are created equal, that they are endowed by their Creator with certain unalienable Rights.” Among these were the natural rights to institute a government “of, by and for the people”; to think, speak, publish, worship, assemble, and organize freely; and to have these rights protected by an independent judiciary.

When these principles were first codified in 1776 and in 1789, in the Constitution and the Bill of Rights, they embodied a uniquely American creed. But they drew heavily from European Enlightenment thinkers. And the founders advanced them as universal values. Since America’s founding, the principles of equality, freedom, and government by and for the people have been increasingly embraced around the world, particularly since the mid-1970s, when democracy began its spread from being mainly a Western phenomenon to a global one, in nearly 120 countries today. During this period, the number of liberal democracies—with good protections for political and civil freedoms under a rule of law—also steadily increased, from 57 states in 1994 to 79 states in 2005 (about 40 percent of all the world’s states). And that is where it remains.

Over the last decade, democratic progress ground to a halt and freedom has been receding, for a number of reasons. The debacle of American intervention in Iraq, which was justified in part as a “democracy promotion” exercise, soured the U.S. and other Western publics on the goal of trying to support the spread of democracy, even by peaceful means. The shambles in Iraq, the rise of China, the aggression of Russia’s Vladimir Putin, and the tentativeness of American leadership have also diminished American prestige and influence in the world. And in poorer countries, democracy has struggled against long odds due to weak states, massive corruption, and low levels of education.

You can’t beat a surging ideology with no ideology or higher sense of purpose. In the face of the persistent challenge of violent Islamist extremism and the global recession of freedom, what the world has needed is a powerful reaffirmation of the universal relevance of liberal values. Instead, the democratic West has been retreating into moral relativism and illiberal impulses.

The assault on liberal values has been a defining feature of the democratic recession. During the past decade, democracy has typically ended not with tanks rolling in the streets or the president shutting down parliament, but rather in suffocating increments: with a regime steadily rigging elections, limiting opposition rights, taming independent media, and criminalizing the work of independent organizations. This was the playbook by which Putin took Russia from a quasi-democracy into a personal dictatorship, dependent on xenophobic nationalism and international conflict for its legitimacy. The script has been copied in varying degrees by Hugo Chavez in Venezuela, his populist authoritarian soulmates in Bolivia, Ecuador, and Nicaragua, and by Recep Tayyip Erdogan in Turkey, among others.

With the lavish aid of financial inducements, Putin and his oil-rich fellow autocrats in Azerbaijan and Kazakhstan have been attracting support from a growing number of European politicians. But worse than material cooptation has been the unabashed admiration for Putin’s illiberal rule from the Hungarian prime minister, Viktor Orban, along with many other right-wing anti-immigrant European politicians. In October elections, Poland’s far-right Law and Justice party stormed back to power after eight years, with its leader, President Jaroslaw Kaczynski, evincing admiration for Orban’s chauvinistic concentration of power. It remains to be seen if Kaczynski and his party will erode democratic freedoms, pluralism, and the rule of law with the zeal and skill of Orban, but the early signs are disturbing.

Historically, authoritarian populists have thrived at the ballot box when voters feel angry, alienated, and insecure. It’s not just physical insecurity (terrorism, violence, and war) that inclines people toward political extremes. Rapid social change and economic insecurity leave people feeling threatened and unmoored—susceptible to chauvinistic, anti-immigrant slogans.

That is why, even before the current Syrian refugee crisis, right-wing populist parties were gaining dramatically across a Europe buffeted by economic stagnation, large-scale immigration, rising inequality, and the growing distance between ordinary citizens and the institutions of the European Union. Recently, the anti-immigrant right-wing National Front led the first round of French regional elections with 30 percent of the vote. Although it lost all of the second-round races, its leader, Marine Le Pen, is now a serious contender for the French presidency in 2017. In Switzerland in October, the anti-immigrant Swiss People’s Party became the largest party in the federal parliament with a similar share of the vote. In Austria and Greece, resilient far-right parties have neo-Nazi roots.

As Seymour Martin Lipset and Earl Raab wrote some four decades ago in The Politics of Unreason, Americans have historically flocked to far-right movements when they felt their social status was threatened. A classic analogue to Donald Trump’s tirades against Mexican immigrants—and, now that there is a hotter button to push, Muslim immigrants—was the Know Nothing movement of the 1850s, which stirred bigoted populist fears of being overwhelmed by Catholic immigration. It was one of several reactionary movements that sought to curb immigration—fortunately with little lasting effect. Eight decades later, the tables turned when a charismatic anti-Semitic Catholic priest, Father Charles Coughlin, used his radio broadcasts to promote sympathy for Hitler and Mussolini and to blame the Jews for the Bolshevik revolution, the spread of communism, and (paradoxically) control of international banking as well.

These were only two of many moments when political demagogues deftly manipulated fear to build a nativist, anti-elitist political movement against pluralism, tolerance, and global integration. Pat Buchanan’s presidential campaigns in the 1990s had many of these strains, but while Buchanan won the 1996 Republican primary in New Hampshire (and little else), Donald Trump could prove to be the most serious U.S. presidential contender in memory to play with this kind of fire.

Common to right-wing populist movements is the nativist instinct to stigmatize and divide, to propagate simple answers to complex policy challenges, and to blame some “other”—a vulnerable minority, a corrupt elite, malevolent external forces, or typically some conspiracy among these—for people’s anxieties. This is the common ground on which Vladimir Putin, Viktor Orban, Marine Le Pen, and Donald Trump stand. While they differ in their implications for democracy (or in the extent to which they have so far had the opportunity to damage it), they share striking similarities in the tone and content of their appeal. Most strikingly, the far-right populists in Europe and the United States share a strong current of respect, or even open admiration, for Putin.

But the nativist lurch tends to end badly for a country, and never more so than in an era when increasing global trade and competitiveness place a premium on openness, innovation, and cooperation. Xenophobic nationalism and ethnic chauvinism stifle the flows of capital, talent, and ideas that are the true lasting foundations of prosperity. As Ronald Reagan’s secretary of state, George Shultz, never tires of emphasizing, the common political challenge of our time is learning how to govern over diversity. That is the most precious advantage that liberal democracies (most of all the United States) have enjoyed over other forms of government.

Freedom and pluralism do not just confer a long-run economic advantage. They also generate the deeper cohesion, flexibility, and resilience that have always enabled America to prevail over authoritarian and totalitarian challengers. It is not just electoral choice but an abiding commitment to the freedom and equal worth of every individual that makes the United States and its fellow liberal democracies the envy of most of the rest of the world.

If the United States degrades freedom in the quest for security, its citizens will wind up neither free nor secure. There is little that the radical Islamists want more than to propel America down this self-destructive path. In the battle against Islamic terrorism, there is nothing that will strengthen the country more than to affirm that Americans are all in this fight together, equally, irrespective of race, religion, or class.