BERLIN — In the 20th century, the battle of ideas between Europe’s dominant political camps was often just that: a fierce exchange that left blood in the streets.

The modern equivalent was on display this week in the German capital, when Germany’s Social Democrat Foreign Minister Sigmar Gabriel invited Jean-Claude Juncker, a Christian Democrat, to critique his latest book, a collection of musings on how to achieve “fair globalization” and put Europe back on track.

The European Commission president’s appraisal: “It’s worth reading this book.”

After comparing the book’s title — “New Measurements” — to Gabriel’s shrinking girth, he added that the former SPD chief clearly had more to say than would fit within the tome’s 236 pages. Gabriel returned the compliment, jokingly inviting his friend “Jean-Claude” to join to the next German government as a minister.

The light-hearted camaraderie between the two Europhiles would have been unremarkable except for one point: they stand (ostensibly) on opposite sides of the political aisle. If there was a contest between the two men, it would be over who could be more effusive in his praise of the other.

The coziness on display illustrates how long-held assumptions about political allegiances are being upended. The ideological camps that dominated post-war Western Europe — with the social conservatives forging coalitions with business-friendly liberals and the more statist socialists banding with parties further to their left — have given way to shifting alliances. From Germany to France, from Italy to the United Kingdom, today’s conservatives are just as likely to cooperate with Greens as they are with liberals. There are even cases of communists joining forces with conservatives, a once unthinkable constellation.

“Things are changing in a way that makes national politics unpredictable, precarious and chaotic sometimes. It’s very turbulent” — Claus Offe, political science professor

After the trauma of two World Wars, the left- and right-wing blocs offered Europeans easy orientation, a sense of identity and the stability weary voters were looking for. These days, little distinguishes the Continent’s two main blocs apart from their colors. The center-right’s traditional allegiance to religious authority has the same degree of influence on its thinking and strategy as unions do on the socialists — not much.

What’s driven the shift is prosperity. As Europe’s societies have become richer and better educated, the dividing lines between blue- and white-collar workers have faded. The nature of work has also changed. That’s been a particular challenge to Europe’s socialists, who can no longer rely on legions of assembly-line workers for votes. In many countries, those voters are more likely to embrace a populist party, such as France’s National Front or the Dutch Party for Freedom.

“The European party systems are in dissolution,” said Claus Offe, a political science professor at the Berlin-based Hertie School of Governance who co-authored a study published this week about how to preserve democracy in the current environment. “Things are changing in a way that makes national politics unpredictable, precarious and chaotic sometimes. It’s very turbulent.”

One possible remedy to the fracturing, Offe argues, would be a “supranational” party system in the EU in place of the loose affiliation between families of parties that now exists.

A generational shift

In a bid to maintain power, both of the large mainstream parties have focused on holding the center. In the process, they’ve become almost indistinguishable.

The shift toward the middle gathered pace in the 1990s after the Berlin Wall fell. As Europe became more prosperous, social mores and economic attitudes became more liberal. The rigid attitudes of the Cold War lost their appeal. With the world no longer threatened with nuclear annihilation, softer attitudes prevailed. Meanwhile, a generation of politicians born after World War II was coming to power for the first time.

In Germany, that generational shift helped propel the Greens into government for the first time in coalition with the Social Democrats. In the U.K., it facilitated the birth of Prime Minister Tony Blair’s “Third Way,” a center-left prescription that embraced many of the capitalist ideals socialism was founded to resist.

Among the idea’s adherents was then-German Chancellor Gerhard Schröder, who was emboldened to break with his party’s traditions and embrace a radical overhaul of his country’s labor market and social welfare system. Economists credit those reforms, known as the Agenda 2010, for sparking Germany’s recent economic revival. But the pain they caused also cost Schröder his job and led to a fracturing of his party, an early sign of the perils parties can face when they veer too far from their traditional core.

Looking back, some political scientists say the center-left’s muddling of its message in the 1990s — though popular at the time — both sowed the seeds for its recent downfall and helped fuel the rise of populism. The reason: The strategy of straddling the mainstream left the fringes wide open.

Meanwhile, the once-dominant socialists have been decimated in countries across Europe, from the Netherlands to France to the U.K.

The blurring of political divisions extends well beyond the political center. While it’s become fashionable among the Davos crowd to say that the traditional divisions between left and right have been supplanted by “open and closed” (liberalism vs. protectionism), the reality is messier. On issues as varied as globalization, immigration and national identity, politicians of all stripes sometimes straddle part of the divide, but rarely all of it. Prevailing in this bazaar of ideas requires not fixed ideology but flexibility.

U.S. President Donald Trump campaigned against long-held positions of his Republican Party on trade and foreign policy and made an open pitch to supporters of Bernie Sanders, a socialist.

Trump’s isn’t the only one breaking old molds. Emmanuel Macron, little known even in France just a year ago, seized one of the most powerful political perches in the Western hemisphere by promising to be “neither left nor right.” It’s a message that is all the more noteworthy coming from France, given that the left-right shorthand was born out of the French Revolution.

Similarly, Marine Le Pen is usually described as “far right,” but her positions on economic issues and the euro could have just as well placed her in the opposite camp, frustrating some political commentators. “Our arguments and definitions are stale at precisely the time when they need to be at their most limber,” the U.K. Spectator wrote last month on the state of political labeling in Europe.

Distrust of the euro and opposition to globalization have created an unexpected symmetry in the messages of parties as diverse as Spain’s left-wing Podemos, Germany’s neo-fascist Alternative for Germany and Greece’s anti-Semitic Golden Dawn.

And then there’s Angela Merkel. Like Juncker, the German leader is often caricatured as a closet socialist. Her particular talent, political scientists say, has been to attract Greens and other liberal voters to the Christian Democrats’ fold. By co-opting left-of-center positions on issues from the environment to immigration, for example, Merkel has succeeded building a political base that extends well beyond the traditional boundaries of her party. Even as some Christian Democrats have worried about losing their party’s conservative base to the fringes, Merkel has stayed the course.

For her, it works. The power of that strategy was on full display Sunday as the CDU trounced its rivals in regional elections in the state of Schleswig-Holstein, drawing thousands of votes from the ranks of both the Greens and Social Democrats. The victory marked the first time the CDU succeeded in ousting an incumbent government since Merkel became chancellor in 2005. “There was definitely a Merkel effect in Schleswig-Holstein,” said Günther Daniel, the CDU’s lead candidate in the state.

No easy answers

Merkel’s success has been driven largely by economic factors. Unlike much of the rest of Europe, Germany’s economy is robust and unemployment at near-record lows. Voters trust her stewardship and aren’t bothered by her lack of a strong vision or ideological compass.

She isn’t the only one. For the most part, European politicians have no new ideas, no over-arching ideology or philosophy like communism or capitalism to peddle to voters.

When it comes to the major challenges facing Europe, the parties are often at a loss for words, usually because there are simply no easy answers. Consider the expected revolution in robotics, automation and artificial intelligence, developments that many economists predict will cost the region scores of industrial jobs and fundamentally alter the structure of the Continent’s economy. As with other difficult subjects like combatting climate change and dealing with rapidly aging societies, ideology is usually more a hindrance to finding a solution than a help.

“The last decade was one of economic instability. The coming decade is one of political instability” — political science professor

Part of the problem is that in a globalized economy, where states are in competition with countries across the globe, governments have lost their enforcement powers in areas like corporate tax. To force the issue risks sacrificing a company headquarters or a factory and the jobs that go with them. “The economic imperatives of states embedded in international economies are so stringent and powerful that political parties can’t achieve very much, even with the best intentions,” Offe said. “They cannot redeem their promises.”

In this environment, the only real choice voters have is between parties that want to preserve democracy and their opponents: populist parties like Hungary’s Fidesz or Poland’s Law and Justice party that systematically question the legitimacy of elections, their political opposition and the courts.

The center may have held in France, but the campaign also led to a further normalization of populist ideas, warned Jan-Werner Müller, a political scientist at Princeton University who published a book last year on populism.

The big question is what Europe will look like once the political maelstrom has settled. Recent elections in Austria, the Netherlands and France — where voters were presented with a clear choice between populism and its opponents — have given hope to proponents of liberalism. “This entire process may be read one day as a healthy process of renewal,” Müller said. “If people feel this is a clear and legitimate choice, it can actually restore faith in democracy.”

Given the West’s shattered party system, the challenge will be getting to that point. “This is a daring diagnosis but it sounds right,” Offe said. “The last decade was one of economic instability. The coming decade is one of political instability.”