AfD supporters attend a rally in 2014.Thomas Peter / Reuters

BERLIN—When Germany’s domestic-intelligence chief announced last month that his agency would begin keeping tabs on parts of the Alternative for Germany, the country’s biggest far-right party, and was considering putting the entire grouping under surveillance, he framed it as a matter of merely doing his democratic duty.

Thomas Haldenwang’s announcement sparked cheers from many here who view the AfD as an extremist party, and outrage from AfD leaders who have since taken legal action against what they called a politically motivated and stigmatizing move.

On a broader scale, though, the intelligence agency’s decision is the latest and most high-profile way the AfD is testing German democracy—and prompting fundamental questions about the benefits and boundaries of the unique protections Germany has put in place to prevent a repeat of its Nazi past. What kinds of “early warning systems,” as Haldenwang said in January, can and should government institutions here employ? And at a time when the AfD seeks to informally push the limits of acceptable political speech, where and how should the state draw the legal line between what’s allowed and what’s not, particularly when it comes to a party that sits in Parliament?

“It shows you how difficult it is in a democracy … to define very clearly what is beyond the border of what’s acceptable,” Jan Techau, the Berlin-based director of the German Marshall Fund’s Europe program, told me. “It brings up the question, to what extent can an open society actually defend itself against its enemies?”

Germany’s history is clearly reflected in its political system: After World War II, its constitution and institutions were designed with the underlying goal of preventing the rise of another Nazi regime. The domestic intelligence agency, for example, is called the Federal Office for the Protection of the Constitution (or Bundesamt für Verfassungsschutz), and is just one of many particular aspects of German democracy—some codified in law or in the constitution, others unwritten rules of political engagement—aimed at protecting democracy and combatting extremism, particularly on the right.

“The basic idea behind [the German political system] is that certain boundaries must be drawn within democracy, that should make it impossible for an antidemocratic force to take over power,” says Steffen Kailitz, a professor of political science at the Hannah Arendt Institute for the Research on Totalitarianism in Dresden. “Whether that is realistic is another question."

Under the German constitution, extremist groups can be not only monitored but even banned (something that has happened to political parties only twice, most recently in the 1950s). German law makes it a crime to deny the Holocaust and to display Nazi imagery or the Hitler salute. Restrictions on hate speech, which under German law can range from incitement of violence to certain statements about specific religions or religious organizations, are stronger here than in many other Western countries, particularly since the introduction last year of a law governing online speech. These institutions are far from perfect: Haldenwang’s predecessor at the Verfassungsschutz was fired last fall after questioning the authenticity of videos from the far-right demonstrations in Chemnitz last summer, and the agency has been criticized for having a blind spot when it comes to far-right extremism. But they exist with the goal of protecting German democracy, and such limits on Holocaust denial or Nazi imagery are there for what many politicians say is good reason.

“These limits have arisen from German history. Whether that makes sense or not, you can discuss—but that’s the way things are,” Stefan Liebich, a lawmaker from the Left party, told me.

The AfD is perhaps the biggest test yet for these boundaries. Though the party is hardly the first far-right movement to try to compete in Germany’s postwar political ecosystem, it’s by leaps and bounds the most successful one: More than five million people supported the AfD in the 2017 federal elections, earning it 12.6 percent of the vote nationally and more than 90 seats in the German Bundestag. And as of October, the party is represented in all 16 of Germany’s state legislatures.

Though its lawmakers may have been democratically elected, the AfD has given the Verfassungsschutz plenty of fodder to point to in its surveillance decision (436 pages of it, in fact, all from public comments or social media). Some of the party’s most visible politicians have promoted a revisionist view of the country’s dark past, most notably Björn Höcke, who leads the “Wing,” an extreme far-right faction within the AfD,which is now under surveillance. He has called Berlin’s Holocaust Memorial, a collection of thousands of gray concrete pillars down the street from the Bundestag and the Brandenburg Gate, a “monument of shame” and once downplayed and defended a Nazi activist’s Holocaust denial. The party co-leader, Alexander Gauland has also come under fire: He referred to the Nazi era as a mere “speck of bird poop” in the country’s otherwise illustrious history and said that Germany should be proud of its World War II soldiers.

When it comes to the party’s rhetoric about refugees and migrants, AfD leaders have even at times run afoul of online hate-speech laws, with one lawmaker finding herself temporarily suspended from Twitter and Facebook last year after posting about “barbaric, gang-raping Muslim hordes.” And the Chemnitz riots, which saw AfD supporters and radical far-right groups such as Pegida marching side by side, showed the extent to which harsh rhetoric about refugees can turn into violent action.

Not every lawmaker in the AfD espouses such views: The party, after all, was originally founded in opposition to the euro, taking up the anti-refugee mantle only after the influx of newcomers to Germany in 2015 and 2016. But the fact that the party’s top leadership has allowed such rhetoric, and even in some cases elevated those politicians within its ranks, experts say, is part of why the Verfassungsschutz chose to move toward surveillance.

That, combined with some party members’ ties to other monitored extremist groups—the Young Alternative, AfD’s youth wing, was placed under surveillance in part because of its ties to the far-right extremist group Generation Identity, for example—gives the impression that the AfD tolerates, if not advocates for, extremist views. (Even Bernd Lucke, one of the original founders of the party who has since left, recently said that he believes the Verfassungsschutz is right to monitor some parts of the party.)

"It may be that the majority of the AfD doesn't agree with everything Mr. Höcke says. The decisive thing is that Mr. Höcke isn't marginalized and isn't isolated,” says Axel Salheiser, a researcher who focuses on extremism at the Institute for Democracy and Civil Society in Jena, in eastern Germany.

There are also informal ways in which traditional parties use parliamentary procedure or unwritten rules to push back against rhetoric or specific members within the AfD they see as unacceptable. For example, when the AfD first put up its candidate for Bundestag vice president, Albrecht Glaser, in late 2017, members of other parties repeatedly refused to confirm him because of controversial comments he’d made about Islam. (Though typically each party gets to have one vice president in the legislature, the AfD still doesn’t have one.) And when it comes to involvement in certain topics or committee assignments—intelligence, or the culture committees that oversee museums and memorials, for example—lawmakers have rejected or delayed AfD nominees they find offensive or inappropriate.

The upside to these bigger-picture discussions, the German Marshall Fund’s Techau argued, is that they’re the kinds of growing pains democracies sometimes need. Periodically debating such issues is important to keeping democracy alive and kicking, he said.

The AfD “triggers the kind of debate that you want to have in a live democracy, where people have to define the terms on which debate has to be had, again and again,” he told me. “It is also ... a signal that democracy wants to defend itself, no matter how difficult.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.