On Aug. 23, 1939, the foreign ministers of the Soviet Union and the Third Reich secretly met in Moscow to sign a treaty of non-aggression. The infamous “red-brown pact” paved the way for the Nazis’ conquest of large swathes of central Europe. It also caused a deep crisis of conscience for activists, including my grandparents, who had been attracted to communism in part because of its promises to free the world from sectarianism and racial injustice.

In the end, most communists found some way of reconciling their conscience with the unconscionable. They invoked strategy or necessity, the evil of bourgeois capitalism or the wisdom of Joseph Stalin (or denied the existence of the pact altogether). In one way or the other, they contrived to recover the certitude that they were on the side of the angels—and that this could, at times, justify an alliance with the devil.

International politics is always ripe for strange partnerships, of course. How else to explain that Iran is allied with North Korea, or indeed that the United States supports the governments of Egypt and Saudi Arabia? And yet, something about the seismic shifts now transforming the ideological spectrum of Western democracies goes beyond these partnerships of convenience. Both left-wing and right-wing enemies of liberal democracy are smelling blood in the water—and they are not too picky about the people with whom they are to share the feast.

All around the world, left-wing and right-wing populists are finding it surprisingly easy to make common cause: In Greece, far-left Syriza ascended to government power in a coalition with far-right ANEL. In many European countries, the Kremlin is simultaneously supporting populist insurgents on both sides of the political spectrum. In much of the West, both the radical right and the anti-imperialist left close their eyes to the war crimes of Syria’s Bashar al-Assad. Meanwhile, in the United States, a growing number of leftists are disdainful of the idea that Donald Trump might represent a special danger; America, they say, is so deeply rotten that it’s naïve to think of Trump as a departure from the past, or to fear that there’s anything of value left to defend.

But nothing has brought today’s bizarre, postmodern variation on the red-brown alliance into focus quite as sharply as the recent news that Italy’s amorphous Five Star Movement is trying to build a coalition government with the deeply xenophobic League.

The mayors of the League have, for years, been in the ugly habit of ramping up deportations around the end of the year under the slogan of “White Christmas.” When a former member of the party went on a shooting rampage in the southern city of Macerata at the beginning of this year—seriously injuring six African immigrants—Matteo Salvini, the party’s leader, pointedly refused to condemn him. In an age in which the term “white supremacy” is at times applied rather indiscriminately, there can be little doubt that it applies to Salvini’s men.

Ideology is not the most defining characteristic of the populists. What truly defines them is a political style.

The Five Star Movement, by contrast, clearly started on the political left. Though Beppe Grillo has at times pronounced the old ideological distinctions to be dead, he rose to political prominence by assailing Silvio Berlusconi (a right-wing populist who has cultivated as many dubious ties as Michael Cohen, yet was politically rather more moderate than Donald Trump). It derives its name from five early demands, all of which fit comfortably on the left side of the political spectrum: Control over local water supply should stay in public hands; the government should do much more to protect the environment; every town should provide its citizens with free access to the internet; Italy should favor bikes, buses, and trains over cars; and it should embark on a sustainable model of economic development inspired by the concept of “de-growth.”

And yet, this populist movement with its justified anger at a corrupt political leader and its hodgepodge list of idealistic demands has, with breathtaking rapidity, gone sour. Over the years, its representatives started to insinuate that 9/11 might have been an inside job, built ever-closer ties with the Kremlin, and took increasingly noxious stances on immigration.

That transformation is now nearing its completion: Faced with a choice between new elections, a joint government with the center-left Democratic Party, or a pact with the racists of Salvini’s League, the leaders of the Five Star Movement have opted for a left-right populist alliance. Early media reports make clear what the new government’s first order of business is likely to be if it really does come together: a crackdown on immigrants. Political logic also dictates a second undertaking: Unable to agree on much of a positive program, they will likely use their shared hostility to the European Union as a glue that can help keep their fractious coalition together.

This should serve as a timely warning to all those who believe that only right-wing populism is truly dangerous, and therefore regard the rise of left-wing populism as a benign correction to the failings of liberal democracy. In The Populist Explosion, for example, John Judis argued that right-wing populism is likely to lead to violence and injustice because it is “triadic”: Populist leaders like Donald Trump claim to channel the voice of ordinary people in the fight against both elites and vulnerable minorities, from Muslims to black Americans. Left-wing populism, by contrast, is unlikely to instigate the same devastation because it is “dyadic”: Fully focused on the conflict between ordinary people and political elites, it does not scapegoat outsiders. Therefore, it isn’t likely to compound existing injustices.

But this overlooks that ideology is not the most defining characteristic of the populists. As I argue in The People vs. Democracy, what truly defines them is a political style that combines a fixation on odious villains and simple solutions with a deep disdain for the existing institutions of representative democracy. That helps to explain why left-wing populists might sound very different from right-wing populists in the early stages, when they are far from power, but are likely to resemble them more and more as they mature.

Since a noble attraction to assailing the baddies can easily turn into a reckless addiction to casting everybody as an enemy, their hatred of politicians and corporations can easily transfer to migrants and minorities. And since they believe their enemy’s enemy to be their friend, they will always be tempted to cheer the rise of right-wing populists—and even to make common cause with them when they can’t govern on their own. In the language of Judis, the Five Star Movement may, like Hugo Chavez in Venezuela and other leftist dictatorships, have started as a dyadic movement—but the ease and speed with which it acquired a third, and deeply xenophobic, axis makes that distinction feel rather arcane.

Historical comparisons nearly always contain fewer analogies than disanalogies. This is doubly true for those, like the red-brown pact, that reach back to the most bitter episodes of human history. Thankfully, neither Grillo nor Salvini are likely to attain the historical importance of Molotov and Ribbentrop. And yet, we should not take too much comfort in Karl Marx’s famous quip that when history repeats itself, what was once tragedy is miraculously transmuted into farce.

For all the many differences between the present moment and the past, the 20th century has given us plenty of bitter opportunities that showcase what happens when parts of the left grow so hostile to liberal democracy that they become willing to make common cause with the far right. And even if the results should turn out a little more farcical and a tad less tragic this time around, they would still be likely to visit unspeakable cruelty and suffering upon the world.