Fabrizio Bensch / Reuters

When Angela Merkel welcomed hundreds of thousands of asylum-seekers from countries such as Syria, Iraq, and Afghanistan into Germany two years ago, she was widely hailed as a saint. On the cover of the German magazine Der Spiegel, she was the second coming of Mother Teresa. As Time’s person of the year, she was the “Chancellor of the Free World.” The leader of a nation intimately acquainted with the dark side of xenophobic nationalism was righteously rejecting the nativism sweeping other countries.

But as Germany struggled mightily to integrate the newcomers and Merkel’s popularity plummeted, the conversation quickly turned to whether the sainted leader had, in fact, committed a catastrophic sin. “Germany is a mess,” Donald Trump told Malcolm Turnbull in a phone call early this year. “These people are crazy to let this happen.” The Australian prime minister readily agreed with his American counterpart. “You cannot maintain popular support for immigration policy, multiculturalism, unless you can control your borders,” he responded.

So how is Merkel, whose government was once judged by eight in 10 Germans to have lost control of the migrant crisis, now poised to win a fourth term as chancellor in elections on September 24? How is it that she has rebounded to a much higher approval rating than, say, Donald Trump or Malcolm Turnbull? Wir schaffen das, Merkel pledged at the outset of the crisis. “We’ll manage it.” How did Merkel manage it? How did Germany?

Can the modern world’s most explosive political issue really be defused?

The Polity

Today, the strongest political force behind restricting immigration is the populist nationalism championed by figures such as Trump, Viktor Orban in Hungary, and Marine Le Pen in France. But modern Germany has proven resistant to this strain of populism.

Leaders of the upstart Alternative for Germany (AfD) party have advocated sealing off German borders and described Islam as an invading force that is “not a part of Germany.” (AfD campaign posters include an image of a pregnant woman with the words “New Germans? We make them ourselves.”) The AfD looks set to win seats in the German Bundestag in September, becoming the first far-right party to enter the country’s parliament since the end of World War II. But the AfD’s popularity, which mostly rises and falls along with opposition to Merkel’s refugee policies, appears to have peaked last fall, with support for the party now hovering just below 10 percent of the electorate.

Germany’s resilience to populist movements can be explained by three factors, according to Peter Wittig, the German ambassador to the United States: a robust economy, considerable public support for international institutions like the European Union, and antibodies generated by the country’s experience with Nazi ideology.

Populism is “nourished” by cultural and socioeconomic “grievances,” but Germany has recently enjoyed “record-low unemployment, record-low youth unemployment … [a] pretty good social-security system, less people that feel left behind, less losses [from] globalization, not a dramatic inequality,” Wittig observed at the Aspen Ideas Festival this summer. Nationalism is kept in check by the fact that many Germans believe they have materially benefited from membership in the EU, which has left Germany the dominant power in Europe, surrounded by friends.

Meanwhile, Wittig added, “right-wing discourse, authoritarian temptations are still stigmatized by the Nazi past.” Even as they compete for votes, the leaders of Germany’s major parties have all shunned the AfD and more extreme anti-immigrant groups. As Merkel warned her rivals in September 2016, after the AfD’s impressive showing in regional elections, “If we seek to get the better of each other for short-term gain … the ones who’ll win are those who depend on slogans and simple answers.”

“There’s a consensus among the main political parties that the election campaign should not be fought on the back of refugees,” said Petra Bendel, a member of the nonpartisan Expert Council of German Foundations on Integration and Migration. “The real division is between all the democratic parties and the xenophobic and Islamophobic AfD.”

Populist sentiment is more widespread in Germany than the AfD’s poll numbers suggest. The Bertelsmann Foundation recently found that 29 percent of eligible German voters—on the left, right, and center of the political spectrum—could be described as “populist-inclined,” in that they want to transfer power from discredited political elites to the broader public and dismiss the idea that the “will of the people” is diverse rather than uniform. Another 37 percent reject these views, with the rest of the electorate falling somewhere in-between. Inequality may be low in Germany, but it’s still a factor: The less education and income a person had, the more likely he or she was to hold populist views.

Party voters by populism and left-right orientation
Courtesy of Christina Tillmann
Party voters by populism and left-right orientation.

“If we hadn’t had the refugee crisis, we probably wouldn’t be speaking about populism in Germany right now,” argued Christina Tillmann, a democracy expert at the Bertelsmann Foundation. Behind Tillmann's assessment is a warning: Merkel's gains are fragile and could be lost.

Germany was relatively well-positioned to absorb the shock of the refugee crisis, according to Friedrich Heckmann, a migration expert at the University of Bamberg. Over the last decade or so, German leaders across the political spectrum have helped cultivate a public consensus on welcoming immigrants and cultural diversity. Germans have traditionally not defined their country as a nation of immigrants, the way Americans and Canadians do. But as a migrant magnet, Germany is now challenging the United States as the Land of Opportunity; as of 2015, Germany was the world’s second-largest destination for immigrants, though it still trailed far behind the United States. Since 2005, when Merkel first became chancellor and the German economy began booming, politicians, business figures, and members of the media have argued that drawing immigrants to Germany’s aging society—the country has one of the lowest birth rates on the planet—is critical for sustaining economic growth. And the government has bolstered its rhetoric with action, repeatedly adjusting immigration laws to attract skilled foreign workers and investing heavily in efforts to integrate newcomers into the labor market.

“Germany is already quite diverse, and people from the outside often fail to notice that,” said Astrid Ziebarth, a Berlin-based migration scholar at the German Marshall Fund of the United States.

While the logic is that openness to immigrants leads to economic success, the opposite might be true as well. German attitudes toward migration have frequently mirrored the state of the economy. The country’s prevailing immigration narrative, in other words, primarily revolves around the economy. That’s unusual in Europe, where anti-immigration voices such as the Dutch far-right politician Geert Wilders have focused the conversation on national culture and national security.

And, as Bendel pointed out, polls indicate that most Germans retain hope that the latest wave of migrants will contribute positively to the German economy, even as they fear, for instance, that the new arrivals will undermine national security and overburden the country’s education and social-welfare systems. Policies to serve refugees are often characterized as benefitting German society at large, so that “there’s no need [for] envy.” Investments in public housing for migrants enhances housing for the greater public; training teachers to deal with diverse classrooms strengthens the education system overall. Those arguments are easier to make when the economy is strong and resources are plentiful.

Graph showing share of national population who agree "there are too many immigrants in this country."
Courtesy of Michelle Mittelstadt
Share of national population who agree “there are too many immigrants in this country.”

But Germans’ tolerance for accepting migrants—particularly refugees, who often have less education and fewer skills than other immigrants—has limits. For most voters, with the exception of AfD supporters, their preferred refugee policy is “not about mass deportations,” Tillmann said. “It’s not about completely ending migration to our country. It’s about regaining control” over who enters the country. “For Germans, it’s very hard to lose control.”

That’s where Mother Merkel comes in.

The Policies

For many Germans, Angela Merkel’s sin in the fall of 2015 wasn’t letting the influx of asylum-seekers happen, as Donald Trump argued. It was, as Malcolm Turnbull put it, losing control of that influx.

When refugees and migrants headed en masse to Europe—driven by worsening war, warm weather, and welcoming signals from Germany—the European Union’s “Dublin” system, which determines the EU member responsible for processing a given asylum request, broke down. So did Germany’s decades-old system for apportioning refugees across German states based on each state’s wealth and population. Initially, on Merkel’s watch, hundreds of thousands of asylum-seekers went unregistered and hundreds of thousands of asylum applications went unprocessed. Who could even think about assimilating these newcomers into the labor force? The pressing challenge was far more elemental—to provide them food and housing.

The chaos reached its pinnacle in 2016, when men of North African and Middle Eastern origin sexually assaulted hundreds of women during New Year’s celebrations in the city of Cologne, sparking public outrage at the government’s bumbling response. The day before the city’s mayoral election, a man upset over refugee policy stabbed the leading candidate in the neck. A spasm of violence against foreigners ensued.

“Two cardinal principles of Germany’s migration consensus—control over flows and investment in integration—have thus been directly undermined by the ongoing crisis,” Heckmann wrote that year.

Merkel, however, has been clawing her way back to control ever since. The German journalist Bernd Ulrich once observed that Merkel “watches politics like a scientist” (she’s a former quantum chemist), learning and recalibrating with every observation. And she seems to have learned that the 2015 refugee experiment, having blown up in her face, cannot be repeated. The EU’s Dublin system has been reinstated. Border controls between Austria and Germany, both members of the EU’s passport-free Schengen area, have been temporarily imposed. In the spring of 2016, as several Eastern and Central European countries closed a popular migrant route from Greece through the Balkans, Merkel orchestrated a controversial deal in which the EU essentially paid Turkey to become a sponge for asylum-seekers. The Turkish government agreed to prevent migrants from leaving its shores for Europe and to take in migrants deported from Greece. The German government, for its part, has passed stricter asylum laws, sped up asylum processing, and increased deportations of those not granted asylum, especially in 2016. The upshot: Some 280,000 migrants entered Germany last year, relative to 890,000 in 2015. Even fewer are on track to arrive this year despite an uptick in migration from Libya to Italy—a flow that Merkel hopes to reduce through another plan to deter migrants from leaving Africa.

Now, thanks in part to McKinsey consultants and tremendous support from volunteers and civil-society groups, Merkel’s government also has a handle on processing and meeting the basic needs of those applying for asylum. As a result, it has pivoted to pouring billions of dollars a year into integration efforts—the opposite approach to what Merkel has scornfully called “multiculturalism,” in which cultural groups live side by side without necessarily speaking the same language or attaining similar levels of education. Refugees and asylum-seekers with a good chance of receiving refugee status must take courses that include German language, civics, and culture lessons—or risk losing state benefits if they fail to comply. They’re also eligible for fast-tracked work permits and government-subsidized vocational training programs. German businesses are no longer legally required to prioritize the job applications of German and EU citizens over those of asylum-seekers. (This is especially important because, as Bendel noted, a large portion of the asylum-seekers in Germany are between 16 and 30 years old, and thus in their prime schooling and working years.) As of May, more than 200,000 migrants were employed as part of these schemes.

Merkel has rejected calls to establish a cap on the number of refugees Germany can accept, but in practice unlimited numbers of refugees are no longer welcome. “Germany is engaging in a kind of triage, limiting the number of asylum-seekers to whom it offers shelter in order to discourage potential new migrants, more effectively integrate those who remain, and drain some of the rage fueling the far-right,” the journalist James Traub reported late last year.

Triage doesn’t translate to full control over the situation, however. Aydan Özoğuz, the German commissioner for immigration, refugees, and integration, has acknowledged that as many as three quarters of the country’s refugees could still be unemployed five years from now. The refugee employment rate is only 17 percent, and close to a third of those who aren’t working aren’t enrolled in training programs or language courses either. Germany has suffered several terrorist attacks involving migrants and refugees since 2015, most prominently a truck rampage at a Berlin Christmas market by a Tunisian man whose asylum claim had been rejected, but who had lingered in the country nonetheless. Refugees have also been victims of right-wing violence.

A refugee crisis that started as a humanitarian challenge has become a question about long-term assimilation in Germany, as Traub has written, just like it has in other European countries. The task at hand is to integrate “an enormous number of people who are, by and large, Muslim in a place that is, of course, chiefly Christian; who are pious in a place that is chiefly secular; and who, on average, are poorly educated in a place where the economy depends increasingly on high education and high skills,” he explains.

The problem is fundamentally about national identity—about what being “in control” really means. In declaring that Germany has moral and legal obligations to offer asylum to refugees, Merkel is suggesting that “this is not about Germanness, or rather saying Germanness has to do with these universal principles,” Traub reasons. “Then there are people who say, ‘No. This is an ancient culture. We dress in a certain way. We eat in a certain way. We talk in a certain way. That’s who we are.’”

In August, Alexander Gauland, the AfD’s top candidate in the upcoming election, laid bare these tensions. During a campaign stop in the region of Eichsfeld, he lashed out at Özoğuz, the integration commissioner, who was born in Germany but is of Turkish descent, for suggesting that there is no “specifically German culture” beyond the German language. “That's what a German-Turk says,” Gauland told supporters. “Invite her to Eichsfeld and tell her then what specifically German culture is. Afterwards, she'll never come back here and we will be able to dispose of her in Anatolia, thank God.” Politicians of various persuasions swiftly condemned Gauland’s comments.

But Gauland, in an interview, offered a more nuanced account of his positions. He told me that if he were leading the German government, he would grant Syrians fleeing war temporary asylum in Germany in accordance with international law. But he would only provide permanent asylum to Syrians who, say, fought against Syrian President Bashar al-Assad and therefore can’t return home once the war ends. He said that the AfD had recently disciplined a party leader for writing that Germany should only be for Germans, which sounded like a neo-Nazi idea, “not the AfD.”

He resisted comparisons between his policies and those of Donald Trump, except when it came to to putting their respective country “first” and, tellingly, what Gauland described as the American president’s “Muslim ban.” While Germany has “no economic problems, we have cultural problems,” he said. “If you accept 1 million Muslims, then you have a totally other society.”

The Politics

Robin Alexander would like you to think of Angela Merkel as neither a saint nor a sinner, but as a fallible politician surrounded by other fallible political leaders.

In his deeply reported book about the German government’s refugee policy, the Die Welt reporter suggests that Merkel’s original decision to admit asylum-seekers into Germany was a response to an acute, specific emergency, not a calculated plan to solve the refugee crisis. In early September 2015, a crush of desperate migrants in Hungary were making their way to Austria and on to Germany, and something had to be done about it. As Alexander tells it, Merkel left open the border with Austria less because she was intent on opening it than because she sensed that the German people were largely opposed to slamming it shut. (This was just days after news of a truck packed with suffocated migrants near the border between Hungary and Austria, and images of a drowned 3-year-old Syrian boy washed ashore in Turkey, had raced across the world, creating a groundswell of sympathy for refugees. It was just weeks after Merkel had made a Palestinian girl cry on television by stating that Germany “just can’t manage” to extend a blanket welcome to refugees.) And the border initially stayed open—encouraging more migrants to embark for Germany—for the uninspiring reason that no German official wished to assume responsibility for the consequences of closing it.

The chancellor would probably tell the story differently. (A press officer with Merkel’s party declined a request for an interview.) Alexander claims Merkel’s actions were improvisational and politically motivated, but Merkel herself has been consistent in articulating the legal and moral principles underpinning them. In August 2015, just before the heady days of September, she praised the “humanity” of the German constitution’s recognition of the right to asylum for those fleeing political persecution. "The world sees Germany as a country of hope and opportunity, and that was not always the case,” she said then. In August 2017, just ahead of the election, she declared that she would make her 2015 decisions all over again if she had to. “Germany acted humanely” in “averting a humanitarian catastrophe,” Merkel says now. She has repeatedly defended these decisions and principles, even in the wake of electoral setbacks and violent acts by migrants.

But Merkel too has admitted that the German government wasn’t prepared for the refugee influx and for a time in 2015 “didn’t have enough control” over it. And the chancellor has, again and again, skillfully kept the political winds at her back. As the AfD surged in 2016, Merkel helped broker the EU-Turkey migrant deal and backed away from her “We’ll manage it” slogan.

The chancellor has also disarmed her political opponents on the refugee question by embracing policies associated with her right flank (tough asylum laws, a burka ban in public spaces) and her left flank (an improved EU-wide system for distributing refugees). She further benefits from the fact that the Social Democratic Party of her chief challenger, Martin Schulz, was a member of her governing coalition during the refugee crisis. “For the Social Democrats, it would not be credible to now take a strong stance against Merkel, because they have been mainly supporting the government’s policies,” Bendel noted. If you want to cast a vote against Merkel’s refugee policy, Alexander told me, you have two options: side with the AfD, which is anathema to many Germans, or support Schulz, which is like “voting for more Merkel.”

Whereas American politics have grown more polarized since the Cold War, Alexander observed, German politics have become less so. “In our country, the center is not only holding—the center is getting bigger and bigger and bigger,” to the point where Merkel’s center-right Christian Democratic Union and Schulz’s center-left Social Democrats are now nearly indistinguishable, he explained. “We really experienced what it means to live in a divided country. I mean, we had the [Berlin] Wall. When socialism crumbled, that old ideological debate was decided. It was clear which Germany was working better. … So we live in a post-ideology time.”

In addition, “voters in general have a very short-term memory—the refugee crisis is not very apparent in everyday life in Germany anymore,” Tillmann told me. The story of integrating migrants is a “more complex” one to tell than the story of incoming migrants, she argued. “If you don’t solve the problem of people coming to our borders and they don’t have a place to sleep, that’s very clear. … The consequences of doing integration not well [are] not really apparent,” at least not in the near term and absent exceptional incidents like the Cologne assaults.

It’s worrying that the sense of urgency around refugee flows has dissipated, Tillmann added. “The danger of not having those pictures on the TV screen every night anymore is that [integration] moves to the backburner. You’re not as much pressed for finding solutions.”

“A lot of people who only look at TV news say, ‘We can’t see any refugees any longer. Must be over, the crisis,’” the AfD’s Gauland told me, in explaining why his party hasn’t managed to obstruct Merkel’s path to another term in office. “But it isn’t over,” he said.

The result is that, as one German journalist memorably put it, the current election campaign has featured “no wind, never mind a wind of change.” And a windless election has its attractions. Trump “is a gift for Merkel,” Alexander told me. Germans have long seen the United States as a guide and protector. And then the American public elects “someone who, in German eyes, behaves like a madman. … Then you have Putin, the Russian leader, behaving aggressively [and] attacking Ukraine.” Had Marine Le Pen been elected in France earlier this year, on the heels of Britain’s exit from the European Union, the EU could have collapsed.

Germans have the impression that they are living on a “ship of stability and around us it’s very stormy,” Alexander said. Amid such tempests, “do you change the captain?”

A mix of history and political acumen has helped Germany excel relative to other European nations in managing the refugee crisis. Germany’s dynamic economy and tendency to view immigration through an economic lens, its Nazi and Cold War history, its adaptive policies to reassert control over runaway demographic change and its principled but politically savvy leadership, have all played a role.

But beyond September’s election, these assets must also be thought of as potential liabilities. What happens if the German economy turns sluggish? If a major terrorist attack occurs or another wave of migration materializes, shifting the focus from integration back to the precarious exercise of balancing humanitarian relief and national sovereignty? “It’s not so easy to change voting habits in months,” says Gauland, of the AfD, in explaining his party’s poor polling numbers. How about years? Will the German political landscape be reshuffled as the results of efforts to assimilate migrants become more apparent? Is there a point at which an ever-expanding political center stops being a strength and starts becoming a weakness, as ideological populists broach hushed topics and put forth an alternative vision of German identity?

In seeking out stability, Die Zeit’s Jochen Bittner writes, German voters are paradoxically “about to re-elect a chancellor who has brought about the most drastic changes the country has seen since the fall of the Berlin Wall.” Meanwhile, “the most important political topic is not being discussed by the most important political parties in public. Only in private do members of the two main parties talk about what it actually is that ‘we’ have to ‘manage.’” Such are the tradeoffs of Wir schaffen das. The explosive politics of migration have been contained. It is too early to say whether they have been defused.

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