Updated

It worked for Trump. It took Le Pen nearly to the finish line. And it influenced the Brexit vote. Now, concern about unchecked immigration, especially of Middle East and African Muslims, looks like it might have an unexpected influence on Germany’s national elections this weekend.

It’s probably inevitable that Angela Merkel will win her fourth term as chancellor, keeping her Christian Democratic Union in the driver’s seat, though short of a majority of seats in the Bundestag. If that occurs, as expected, Merkel could form a so-called grand coalition with the left-leaning Social Democrats.

The real story of this election, however, is the last-minute surge of the right-of-center party, the Alternative for Germany, or AfD as it is known to voters. After open infighting among its leadership earlier this year, AfD has regrouped and looks like it might take more than 10 percent of the vote, meaning it can be represented in the German parliament.

41cfded3-Germany election

Co-lead AFD candidates Alexander Gauland and Alice Weidel attend a news conference in Berlin, Germany September 18, 2017.REUTERS/Axel Schmidt (REUTERS/Axel Schmidt)

It’s been almost impossible for an openly right-wing party to succeed in modern Germany, where the specter of Nazi rule still unsettles citizens. But Merkel’s open-arms policy to Middle East refugees has stretched her credibility with voters, who nonetheless respect her for keeping the national economy strong.

Still, a string of rapes and other assaults in Cologne two years ago, and other crimes attributed to refugees have put voters in a rebellious mood, and the AfD has benefitted from that dissatisfaction. AfD candidate Georg Pazderski laces his campaign speeches with dark warnings that Germany is being overwhelmed by outsiders. That message resonates especially strongly in regions of the former East Germany, where higher-than-average unemployment is blamed on immigrants.

317e4014-Germany election

people hold anti-immigration party Alternative fuer Deutschland AfD placards as they protest against German Chancellor Angela Merkel campaigning in Heppenheim, Germany, September 22, 2017. (REUTERS/Ralph Orlowski)

Merkel, by contrast, has stuck to her position that Germany -- and for that matter the rest of the European Union – has a moral obligation to welcome refugees from the terror-torn Middle East and northern Africa, and scoffs at the notion that some of the influx of newcomers have terrorist ties.

0dfec27f-Merkel

An election campaign poster for the upcoming general elections of the Christian Democratic Union party (CDU) with a headshot of German Chancellor Angela Merkel is displayed at Alexanderplatz square in Berlin, Germany, September 21, 2017. (REUTERS/Hannibal Hanschke)

Like Donald Trump, and France’s right-wing presidential candidate Martine Le Pen, the AfD is hoping that the appeal of its message is greater than the polls indicate. Indeed, as with Trump, AfD supporters appear uncomfortable revealing their true feelings to pollsters.

That may change on election day, and if it does, as with Trump, Germany could be facing a brave new world of uncertainty next week.