Although much of the West has been shaken by right-wing populist rebellions—from the stunning victory of President Donald Trump in the United States to the United Kingdom's vote to leave the European Union—one country seems curiously immune from it all: Spain. No electorally viable movement in Spain espouses a nativist, xenophobic, or anti-globalization platform. Indeed, far-right or populist parties in Spain have been unable to get more than one percent of the vote in most recent elections; the Spanish Parliament is one of very few in Europe in which these parties have no representation. Similarly, euroskepticism—the desire to lessen ties with the EU—is weak among Spaniards. A 2016 survey by the Pew Research Center found that, among all Europeans, Spaniards were the least supportive of reclaiming more power for national governments from the European Parliament in Brussels.

Spain’s apparent imperviousness to these trends is intriguing because the nation has been anything but immune to the challenges that have elsewhere stoked a populist right-wing backlash. First is immigration. Trump, France’s Marine Le Pen, Hungary’s Viktor Orbán, and the Netherlands’ Geert Wilders have each used this issue to rally supporters around the notion that immigrants are eroding their respective national “identities,” dragging down their economies, and threatening national security. Yet it is Spain that, among European nations, has experienced the most transformative immigration. According to Spain’s National Institute of Statistics, the foreign-born population in the country swelled from one million to close to six million between 1998 and 2016. In the first decade of this century, Spain received nearly half of all immigrants coming into the EU and had the highest net immigration per capita of any EU nation. Clearly, Spain’s resistance to populism is not explained by a lack of immigration.

Economic deterioration is another factor that is often mentioned as fueling right-wing populist movements, and once again Spain is—as it were—top among its European peers in this regard. After 2008, Spain fell into a recession so deep that it threatened to sink the whole eurozone. As GDP contracted, unemployment exploded from eight percent in 2008 to 26 percent at the peak of the crisis in 2013. By comparison, unemployment within the EU during this time rose from seven to 11 percent. Only Greece saw a similar implosion in its employment rates. Moreover, the Spanish government instituted severe and unpopular austerity measures in its efforts to cope with the crisis, slashing social services and public sector salaries. In other words, Spain did not escape the economic catastrophes that pushed other countries toward populism.

A third and final catalyst of populist trends elsewhere in the West is the perception of political corruption by an entrenched elite; but Spain is no paragon of political virtue. According to Transparency International’s Corruption Perception Index, Spain is the second-most corrupt large European economy (beaten out only by Italy). And corruption in Spain is indeed concentrated mainly within the political class: recent scandals have implicated all major political parties, as well as heads of regional governments and many local officials. Even the Spanish royal family, once esteemed, was tarnished when suspect business dealings accelerated the abdication of King Juan Carlos in 2014. Distrust in political institutions is higher in Spain than in other EU nations: according to Eurobarometer, 91 percent of Spaniards distrust political parties (13 points above the EU average) and 69 percent claim to be dissatisfied with democracy (21 points above the EU average).

At the gay pride parade in Madrid in July 2005, the year Spain legalized same-sex marriage. Andrea Comas / REUTERS

THE LONG DICTATORSHIP

So how is it that, in Spain, all the factors that have strengthened right-wing populist movements elsewhere have had little effect? As might be suspected, Spain’s long history with fascism has a lot do with it; the regime of Generalissimo Francisco Franco was the only major fascist dictatorship to survive World War II. In 1936, Franco toppled the Second Republic, Spain’s interwar experiment with democracy, triggering the Spanish Civil War. This bloody conflict, the seminal event in twentieth-century Spanish history, claimed more than half a million lives and forced just as many people to flee into exile. As he consolidated his authoritarian regime, Franco implemented a policy of limpieza, or cleansing, that resulted in the killing of 200,000 alleged political dissidents and sent an additional 400,000 to jail and labor camps.

By the time of Franco’s death in 1975, which opened the way for a much-praised and emulated transition from dictatorship to democracy, Spain had experienced over 40 years of isolation, its civil society was traumatized and underdeveloped, and the economy was stunted, autarkic, and inefficient. This nightmare appears to have immunized Spain to the current wave of far-right populism in several mutually supporting ways. For one thing, Franco’s penchant for demagoguery, hyper-nationalism, and xenophobia makes any Spanish politician who even gestures toward these themes unacceptable to most voters.

Furthermore, Franco’s adoption of nationalist symbols, such as the Spanish flag, rendered the propagandistic use of such imagery deeply distasteful to most Spaniards, hindering nationalistic and nativist narratives. It would be foolish for any Spanish politician to adopt a slogan like “Make Spain more Spanish,” as Le Pen did with her “Make France more French.” Also advising against such rhetoric is Spain’s highly fractured sense of nationalism, a legacy of Franco’s attempt to homogenize Spanish identity by repressing separatist groups in the Basque Country and Catalonia.

Given the long shadow that Francoism casts over contemporary Spanish politics, it is not hard to see why Trump’s reputation in Spain is so toxic. Indeed, Spain leads all European nations in lacking “confidence that Trump will do the right thing on world affairs,” according to a recent Pew Research Center opinion poll. Seven percent of Spaniards express confidence in Trump, as compared to 25 percent in Italy, 22 percent in the United Kingdom, 14 percent in France, and 11 percent in Germany. In fact, in the entire survey of 37 nations, only Mexico outdoes Spain in its distaste for Trump.

Migrants during an attempt to cross into the Spanish enclace of Melilla, February 2015. Jesus Blasco de Avellaneda / REUTERS

A DEFERRED DREAM

Of course, the Franco legacy does not alone explain Spain’s avoidance of right-wing populism. Just as important, if not more, are developments since the end of the Franco era. Among these developments, the most apparent is Spain’s strong attachment to European institutions. According to Pew, before the 2008 economic crisis, 80 percent of Spaniards had a favorable view of the European Union. Only the Polish, newcomers to the organization, were more positive. This explains why the Brussels-bashing that is common in many EU member-states is virtually unheard of in Spain.

Much about the Spaniards’ fondness for the EU can be traced to the country’s long struggle to become European. That may sound odd, given Spain’s central importance in European history; the formation of the Kingdom of Spain in 1492 dramatically reshaped Europe, and the emergence of the Spanish Empire charted a course that other nations would follow. After the end of the Civil War, Franco’s policies effectively cut Spain off from Europe. Franco kept Spain out of World War II, tacitly supporting the Axis powers. In response, the Allied nations imposed an economic boycott on Spain. After the Allies’ victory, Spain was denied economic recovery funds under the Marshall Plan, while Franco alienated Spain’s neighbors and isolated the nation. He quarantined Spain, blaming Europe and its “radical” ideologies for the Civil War, even going so far as to widen the train tracks to prevent an invasion by French boxcars. In an attempt to compensate for the Western economic boycott, Franco sought closer ties with the Arab world and Latin America, especially Argentina’s sympathetic Peronist regime.

It is unsurprising, then, that Spain was not part of the 1957 Treaty of Rome, which created the European Economic Community. Membership was limited to democratic states. But after Franco’s death and the fall of his regime, Spain undertook nearly a decade of protracted negotiations and finally joined the EU in 1986. Since then, Spain has materially benefited from its membership. For many years, it was the largest recipient of EU funds granted to the lowest-income member states. And Spaniards made the most of this aid, as the country’s infrastructure shows: sparkling airports and highways dot the Spanish territory and Europe’s most modern high-speed rail network crisscrosses the landscape. During these years, living standards also rose: Spain’s per capita income is now roughly equal to Italy’s, almost three times that of middle-income members such as Poland. It is understandable that, even during the darkest days of the economic crisis, talks of leaving the EU gained little traction among ordinary Spaniards.

A LIBERAL, MULTICULTURAL NATION

Even more important, however, is that, as a counterreaction to Franco, Spain has evolved into a liberal and inclusive society that values Europe’s commitment to the rule of law, democratic institutions, and respect for human rights. Spain is a pioneer in recognizing the claims to nationhood of culturally distinct communities in its “historic regions”—the Basque Country and Catalonia. These communities possess their own distinct language and traditions, and they enjoy the highest level of regional home rule of any historical sub-community in Europe. Spain has also been uniquely successful in incorporating the Roma within its borders. A 2010 New York Times headline notes that, at a time when France was deporting thousands of Roma, the Spanish government’s decades of effort to improve Romas’ lives were showing success. Virtually all Roma children in Spain were enrolled in school, and almost half of their parents owned homes.

Spain has also led the way in gender and sexual equality. Despite a legacy of traditional Catholicism and a reputation as a bastion of machismo, Spain was the first country in the world to put homosexual couples on the same legal footing as heterosexual couples when it legalized gay marriage in 2005. Spain was also the first nation in Europe, and perhaps the world, to have a female-dominated cabinet, under the recent Socialist administration of José Luis Rodríguez Zapatero.

But the clearest evidence of Spain’s ingrained opposition to the forces of xenophobic populism is that the nation is one of the most welcoming in Europe for immigrants, legal and otherwise. According to Demos, a British think-tank, Spanish public attitudes toward immigrants are the most tolerant in the EU. This is reflected in Spanish immigration laws, which are also among the most liberal in all of Europe. Spain only introduced immigration controls in the mid-1980s, in anticipation of its own entry into the EU. In recent years, millions of so-called sin papeles (“without documents”) have benefited from a generous amnesty program instituted in 2007.

At a grave for Republicans killed during the Spanish Civil War, Oviedo, Spain, April 2013. Eloy Alonso / REUTERS

Spain’s tolerant attitude toward immigrants is a direct legacy of its recent history as a migrant nation. The Civil War and its catastrophic aftermath created nearly one million Spanish political refugees. Under the Franco regime, hundreds of thousands of Spaniards worked as migrants in France and Germany. William Chislett, an analyst at Elcano Royal Institute, Spain’s leading think tank, notes that “Spanish families have relatives who migrated to Europe during the 1950s and 1960s, which has helped them to view today’s immigrants with understanding and sympathy.”

Another factor for Spain’s tolerance toward immigrants might be that the demographics of those who come to Spain are different from those who wind up in Greece or Eastern Europe. For example, British citizens seeking sunshine and lower living costs comprise the third-largest group of immigrants in Spain. They are welcomed because of their contributions to the economy, especially in the poorer parts of Spain, such as the southern region of Andalusia. Another large portion of immigrants comes from Spain’s former colonies in Latin America. The Latin Americans’ facility with the Spanish language and their Catholicism make their integration into Spanish society relatively easy. Another group that assimilates easily into Spain are the Romanians, which comprise the largest group of immigrants to Spain, close to a million since 2000.

THE REINVENTION OF POLITICS

Some final credit for keeping Spain free of right-wing populism is owed to the dramatic transformation of Spanish politics in the post-Franco era. Among the dozens of nations that embarked upon a transition to democracy in the last quarter of the twentieth century, Spain is deservedly known for its politics of moderation. For instance, unlike other post-authoritarian democracies, Spain chose not to prosecute the old regime on human rights crimes; the new government did not even organize a truth commission to assign responsibility for the Civil War. Above all, embracing moderation meant avoiding extreme policies on either end of the political spectrum. Born out of the desire to avoid the kinds of intense ideological conflicts that drove Spain into civil war, this ethos of political moderation has been enshrined in the two parties that consolidated democracy in the post-Franco years: the Social Democratic PSOE and the conservative Popular Party, or PP.

In time for the 1977 general elections, Spain’s first free elections in nearly four decades, the PSOE shed its decades-old Marxist label and wholeheartedly embraced democracy. The PP, for its part, undertook an even bolder reinvention by transforming the Spanish Right from its roots in fascism into a modern, conservative European political force. Along the way, the PP managed to occupy virtually the entire political space from the center-right to the ultra-right. This has rendered groups on the fringes of the right, such as the fascist Falange, politically irrelevant. Among the factors that have allowed the PSOE and the PP to establish near-hegemonic control of the left and the right, respectively, are electoral laws that favor large national parties.

None of this guarantees that Spain will never swing toward right-wing or even far-right populism. Indeed, one can think of several conditions that could erode the existing barriers that have kept right-wing populist movements at bay in Spain. Memories of Franco are fading fast; entire generations of Spaniards have been raised without any direct exposure to the old dictatorship. Meanwhile, Spain’s relationship with the EU is in fact changing: the country is expected to become a net contributor to, rather than recipient of, EU funds by 2019. As a result of this reversal of roles, the Spanish public could become more critical of the organization. A shift in the politics of immigration could also take place, if harder-to-assimilate immigrants, such as refugees from Afghanistan, Libya, or Syria, begin to arrive in large numbers on Spanish shores. This could create an opening for groups like Spain 2000, whose anti-immigration platform so far has failed to find much of an audience.

Lastly, the conservative PP, which currently controls the government, could lose its grip on the right. The party and its main political nemesis, the PSOE, were badly battered during the June, 2016 general elections, with many voters flocking to new political forces, such as Podemos, an anti-austerity left-wing party, and Ciudadanos (or Citizens), an anti-corruption center-right party. Should the PP falter, as has been the case with other conservative parties in Europe, it is not inconceivable that euroskepticism, xenophobia, and economic nationalism begin to infiltrate the political arena.