Germany went to the polls on Sunday to elect a new federal parliament—and a new national government—and the results stunned Europe and the world. Although center-right Chancellor Angela Merkel won a fourth term in office, since her party came out on top in the vote tallies, in truth the election stands as a stern rebuke of her and her party’s governance since 2005. For a politician widely considered the de facto leader of the European Union, and even hailed as the “leader of the free world” by some, including Hillary Clinton, this is a serious setback.

Her Christian Democratic Union (CDU) received one-third of the votes, 33 percent, far ahead of the second-place Social Democrats (SPD) with 20.6 percent, but for both parties this represented a big drop-off since the last elections. In 2013, the CDU and the SPD got 37 and 29 percent, respectively, and Sunday’s tallies are the lowest for both parties since the establishment of the Federal Republic in 1949, out of the ashes of Nazism and the Second World War.

The big news here is the rise of the Alternative for Germany (AfD). Founded only four years ago, this new right-wing party barely competed in the 2013 election, garnering only 1.9 percent of the vote, but on Sunday the upstart AfD won 12.6 percent, which will give them 94 seats in the incoming parliament in Berlin, what Germans call the Bundestag. For the first time since 1990, a new party will be seated in the Bundestag, and it’s on the far-right. The AfD did especially well in economically lagging regions of the former East Germany, where 26 percent of men voted for the party.

Several other parties hovered around the 10-percent mark, including the libertarian-leaning Free Democrats (10.7), the former East German Communists rebranded as Die Linke (9.2), and the environmentalist Greens (8.9). As the chastened Social Democrats show no interest in a grand coalition with Merkel’s Christian Democrats, the only way the chancellor can form a government will be in coalition with some of these smaller parties. The likeliest outcome is the so-called “Jamaica” coalition from the colors of that country’s flag: black for the CDU, yellow for the Free Democrats, and green (obviously) for the Greens.

Merkel will keep the upstart AfD out of government at all costs, viewing them as pariahs and extremists. Ironically, this new rival is very much her own creation, inadvertently. Born out of frustration with Berlin’s costly bailouts of Greece and other bankrupt EU states, the AfD takes its name from one of Merkel’s less popular aphorisms, when she repeatedly stated Germany had “no alternative” but to financially bail out Southern Europe from its insolvency.

This was far from popular with many Germans, a notoriously frugal bunch that loathes debt; as late as 2011, only one-third of Germans had a credit card, and most personal transactions are still in cash. Merkel then made things worse by opening Germany’s doors to migrants in 2015, which made her deeply unpopular with many working-class Germans. The arrival of two million migrants in 2015—relative to population, this would be like the U.S. taking in eight million migrants in 12 months—has caused serious political heartache in certain quarters.

That anger made up some of the AfD’s appeal on Sunday. There are definite wings of the party. Some supporters are financially-minded, worried about the cost of Germany’s dragging along the EU and its vast debts. Others fret about migrants, many of them Muslim, bringing crime, welfare skimming, and terrorism to the country. Then there’s the hard-right element of the party, people who are uncomfortably sympathetic to Germany’s troubled past.

In other words, there are neo-Nazis lurking in the AfD. This is a serious matter, since unlike in America, it’s not legal to fly Nazi flags and shout Hitlerian slogans in public. There is no free speech in Germany about such touchy matters, and people really do wind up in jail for acting out their Nazi fantasies. The march-turned-riot this country witnessed in Charlottesville in August would have been shut down in Germany the minute anybody unfurled a swastika.

Exactly how many neo-Nazis there are in AfD ranks is a tricky question. Some party bigwigs have walked close to the line. Alexander Gauland, a party leader, recently suggested that Germany should act like any other country and be “proud” of its soldiers in both world wars. Such a comment, which would be uncontroversial in most places, was greeted with outrage in Germany, where any public esteem for the Nazi period is verboten.

If the AfD is harboring neo-Nazis, this is a matter for Germany’s intelligence services too. Since the creation of the Federal Republic, the domestic intelligence agency, the mouthful Office for the Protection of the Constitution (BfV), has monitored political extremists looking for unhealthy dissent, left and right. Uncovering subversion—specifically anything that threatens Germany’s democratic values—is one of the BfV’s main jobs, and it has watched the AfD closely since its birth.

Last month, Thomas de Maizière, Germany’s interior minister, frankly admitted that the security services had their eye on the AfD, looking for subversion. Although the party on the whole was “not extremist,” less moderate elements in the AfD did merit examination, de Maizière explained. At the same time, after a review of AfD online activities in part of the former East Germany, the security service concluded that the party was substantially right-wing but not engaged in openly subversive activities.

Germany has shut down neo-Nazi parties before. In 1952, the authorities banned the Socialist Reich Party, which saw itself as Hitler’s heirs and was staffed by former Nazis. It also had the secret backing of Soviet intelligence, which sought to manipulate West German politics during the Cold War.

More recently, the standard-bearer for such views has been the National Democratic Party (NPD). Founded in 1964, it’s a fringe party that has never won any seats in the Bundestag, although it’s intermittently won seats at the state level in Germany. The NPD doesn’t make much effort to hide its Hitlerian sympathies but usually stays on the right side of Germany’s restrictive laws on such matters, if only just.

The party has been of intense concern to the BfV from its birth, and here’s where things get interesting: German authorities have tried more than once to ban the NPD on the grounds that its aims are undemocratic, yet all efforts have failed to stand up in court. The biggest push came between 2001 and 2003, and the case went to Germany’s highest court. There the NPD triumphed on the revealing grounds that, since the party was so filled with BfV agents, it was impossible for the court to assess what the NPD really stood for. Many of its most Nazified members turned out to be clandestine government operatives. The BfV, in effect, was in control of the NPD, and its numerous agents provocateurs were running the show.

Given this recent history, questions must be raised about the AfD as well, not least because the party has worrisome ties to Russia. Party higher-ups are enthusiastic fans of Vladimir Putin, while Kremlin outlets like RT and Sputnik laud the party on a regular basis. Moreover, the election campaign witnessed an explosion of pro-AfD activity online, including Twitter bots, emanating from Russia—just as the Kremlin did in the United States last year.

To be fair, the former Communists of Die Linke are every bit as Russophile as the AfD—which means that Putin has friends on the left and right of Merkel, amounting to 22 percent of the vote on Sunday—while top SPD officials take Kremlin money without any concern for appearances or conflicts of interest. Germany has a problem with illicit Kremlin influence that extends far beyond just the AfD.

That said, the BfV’s interest in the AfD, now the country’s third-biggest political party, encompasses counterintelligence concerns as much as worries about extremism. The arrival of the AfD in the Bundestag will shake up German politics in a manner that’s not been seen in decades, even though the party will not be in government. They will force debate on issues that Chancellor Merkel would prefer to avoid, above all migration and assimilation of newcomers.

It would therefore be wise to watch how the AfD reacts to its newfound limelight. Already cracks are appearing in the party. Less than 24 hours after electoral triumph, Frauke Petry, the leader of the AfD’s more moderate wing, announced she would not take her parliamentary seat, citing chaos inside the party. This stunning news may push the AfD even further to the right. Expect more bumps in this road.

John Schindler is a security expert and former National Security Agency analyst and counterintelligence officer. A specialist in espionage and terrorism, he’s also been a Navy officer and a War College professor. He’s published four books and is on Twitter at @20committee.