(Bloomberg) -- On German unity day, police in Dresden secured a far-right rally from being disrupted by a crowd of black-clad protestors blasting techno music and chanting slogans decrying fascism.

Hundreds of mainly older supporters of Alternative für Deutschland were enjoying beer, sausages and rabble-rousing speeches last month when their opponents marched toward the gathering on a cobbled square in the eastern city’s historic center with rainbow flags and banners supporting migrants. Kitted out with body armor, the state’s security personnel ensured the standoff remained peaceful, but the raw emotions were impossible to ignore. 

As the European Union’s biggest economy wrestles with a persistent slump and a surge in immigration, the specter of German nationalism has returned, leaving citizens more conflicted over their country’s direction than at any point since World War II. Those tensions are rippling through the rest of the EU, too, as it confronts Russian aggression in Ukraine and the turmoil stirred up by Israel’s war with Hamas. 

Dresden should be a poster-child for Germany’s post-reunification efforts. The Neo-Renaissance downtown has been meticulously restored and the surrounding region of Saxony hosts a booming high-tech cluster with Taiwan Semiconductor Manufacturing Co. planning a €10 billion ($10.7 billion) plant — one of the largest foreign investment projects in Germany — adding to facilities from Infineon Technologies AG, GlobalFoundries Inc. and  Robert Bosch GmbH’s semiconductor unit. 

None of that has been enough to stem the rise in support for the AfD. The decline of old industries and new waves of migrants are forcing change on Germany that’s unwelcome for many voters buffeted by surging living costs — especially in the former communist East, where reunification left deep scars. 

“It’s not the economy, stupid,” Maximilian Krah, an AfD representative in the European Parliament, told Bloomberg at the rally in Dresden. “It’s fundamentally about identity — who are you? Is this our country?”

Germany’s political mainstream has struggled to find an answer to the AfD, dismissing the party as fear-mongers and betting that a recovery from a cycle of recession and meagre growth will restore the public’s faith. But there are signs that the frustrations run deeper than that. 

The far-right group leads the polls in Saxony with state elections due next September, one of three ballots next year that offer it a chance to tighten its grip in eastern Germany where its support is strongest. 

While the party is unlikely to gain enough backing in any of those states to govern alone, forming coalitions without their support is likely to be difficult. Even though all other parties have rejected cooperation with the AfD, shutting them out of power risks being seen as undermining the will of the voters and deepening divisions in society.

The AfD is different from some of the right-wing parties elsewhere in Europe that have moderated their positions as they came closer to power. The 10-year-old group’s support is driven by its opposition to immigration, but other policies raise alarm bells for Germany’s allies, including wanting to pull out of the European currency union and build closer links with the Kremlin. That offers encouragement to countries like Hungary and Slovakia that are questioning aid for Ukraine as Kyiv struggles to make headway against the Russian invaders. Read More:Nazi Barbs in Bavaria Rekindle Germany’s Struggles With Its PastThe German Chip Sector’s Next Challenge: Labor Europe’s Economic Engine Is Breaking Down Scholz’s Dream of Climate Revolution to Revive Germany Is Dying

The conflict between Israel and Hamas is adding to the turmoil in Germany. The AfD has promoted images of dark-skinned young men waving Palestinian flags on the streets of Berlin to fuel its narrative that the political mainstream has lost control of the country. 

Days after the showdown in Dresden, the anti-immigrant movement beat all three parties from Chancellor Olaf Scholz’s governing alliance in state elections in Bavaria and Hesse, showing that the frustration that has propelled its support in the East is spreading to more prosperous regions. Such anxiety has become more evident, with right-wing crimes rising 3.8% last year to an average of 57 per day, according to the domestic intelligence service.

“Something is currently at risk that was until recently taken for granted in Germany,” said Oliver Holtemöller, an economics professor at Martin Luther University Halle-Wittenberg. It’s no longer clear that “the basic rules of our society are generally accepted and will continue to exist in the future.” 

In Saxony, the influx of migrants and refugees has stretched local resources to the breaking point, according to State Premier Michael Kretschmer. Thousands of kids aren’t being schooled because of a lack of teachers and classrooms, people are being housed in tents and likely soon in sports halls, the politician from the conservative Christian Democrats said at a news conference in Berlin. 

“The question of whether we want to solve this together will be decided in the coming weeks,” he said. “It’s urgently needed.”

Scholz has repeatedly spoken in recent weeks of the need to crack down on illegal migration, particularly the smugglers who transport people clandestinely across Germany’s borders.

His government last month approved a draft law that aims to make it easier to deport people who don’t have the right to stay in Germany and he’s also talking to the main opposition conservatives about a potential cross-party pact on migration policy. The issue will be on the agenda when he hosts the premiers of Germany’s 16 regions in Berlin on Monday.

Despite raising the minimum wage and successfully navigating last year’s energy crisis, Scholz’s three-way coalition of the center-left SPD, the Greens and the pro-business Free Democrats offers further evidence of the country’s broader divisions. The Greens and the FDP have vast differences on migration, and the two parties have tangled publicly over climate measures and fiscal policy. The bickering has intensified frustration.

“It is depressing to see how there are also attacks against people who make politics — also very violent and very threatening ones,” Chancellor Scholz said an event organized by the parliamentary caucus of his Social Democrats. “Democracy must not be stifled by those who want to impair it with evil behavior, with violence and threats.”

Another sign of the splintering political landscape comes from Sahra Wagenknecht — a well-known parliamentarian from the Left party — who last month announced her own plans to challenge the governing parties. The group known as BSW got support from 12% of voters in an early poll, reflecting dissatisfaction with the political status quo — even if some of that backing came from AfD voters. 

“Fragmentation is a big danger,” said Dresden Mayor Dirk Hilbert, drawing parallels to the fraught atmosphere of the 1920s that preceded the Nazis’ rise to power. “It is a very real risk.”

Germany’s mainstream parties have been hoping that investment in places like Dresden would help them regain voters lost to the AfD. Instead, businesses in the city worry that the growing nationalist sentiment will hurt their efforts to attract talent as the number of German-born workers declines. 

“Refugees who are fleeing for their lives are perhaps not put off by their rhetoric, but highly-skilled employees who could easily go elsewhere certainly are,” said Nils Aldag, chief executive officer of Sunfire GmbH, a manufacturer of equipment that uses renewable energy to generate hydrogen from water. 

When the former communist regions were brought into the Federal Republic in 1990, Chancellor Helmut Kohl promised that reunification would spread the affluence of the West. Instead, the recent votes in Bavaria and Hesse suggest that the long-simmering frustration in places like Saxony is gradually spreading from the East as inequality widens and the once-stable working class gets squeezed.

After years of stability, the country faces a string of structural issues from insufficient transport and data infrastructure to a shortage of skilled labor and an energy network still struggling with the end of deliveries from Russia, according to Deputy Economy Minister Franziska Brantner. “The situation is serious,” she told a conference with German employers.

In Dresden’s ornate Schauspielhaus theater, the accompanying political turmoil is the theme of a new production of Bertolt Brecht’s renowned Three-Penny Opera. Director Volker Lösch has recast the action as a power struggle among right-wing adversaries, with conventional politics sidelined. The goal of the production — set to run until late March — is to highlight the risks of Germany’s nationalist drift, he said in an interview. 

“When people suffer for years from declining social status and the feeling of being left behind, it creates a dangerous situation,” he said. “They’re ready to accept fascism with a shrug of the shoulders because the current system isn’t working for them.”

--With assistance from Petra Sorge, Iain Rogers and Zoe Schneeweiss.

©2023 Bloomberg L.P.