A woman enters a bedroom at a refugee accomodation in a hangar of the former Tempelhof Airport in Berlin on Dec. 26. (Tobias Schwarz/Agence France-Presse/Getty Images)

CHANCELLOR ANGELA Merkel of Germany walks a very narrow tightrope in managing the gravest crisis to hit Europe in years. As more than 1 million refugees from Syria and North Africa streamed into Germany in 2015, Ms. Merkel was firm in her resolve to welcome them. “It is important not to follow those who, with coldness or even hate in their hearts, want to claim Germanness solely for themselves and exclude others,” she said in her year-end address.

Ms. Merkel’s instincts have been right, both as a humanitarian response to the tide of misery and as an opportunity to build a stronger Germany. But she faces deep and serious unease in her own political camp over the influx. At the annual conference of the Christian Democratic Union in mid-December, she won a standing ovation with a declaration that “we want to and we will palpably reduce the number of refugees, because it’s in everyone’s interest.” The ruling coalition is discussing measures that could result in a less welcoming policy in 2016, including expedited deportations for those deemed unworthy of asylum and more hurdles for those who have settled in Germany and want to bring family members. Ms. Merkel is clearly feeling the heat.

In Sweden, too, ardor for the plight of the refugees peaked and cooled. As Post correspondents Griff Witte and Anthony Faiola reported, Sweden was at the forefront of nations welcoming the refugees as waves of people braved the Aegean Sea to reach Europe. Sweden took in more asylum seekers, on a per capita basis, than any other nation on the continent. But now Sweden’s center-left government is deploying new border controls and slashing benefits to send an unmistakable signal to refugees: Don’t come. A Swedish official acknowledged that, despite the nation’s generosity, “Even we have our limits.”

Europe’s open-borders Schengen Area has been trampled by the refu­gee influx, which prompted individual nations to revive internal border controls that had long ago melted away. Despite promises, the European Union has taken little concrete action to gain control of the continent’s external borders, and it does not seem likely to do so in the near future. Nor does Turkey seem equipped to stem the tide on its own, despite a large aid package from the E.U. It’s understandable that the sense of lost control has fueled reactionary sentiments, as have the worrisome reports from investigators that at least three of the attackers in the Nov. 13 assault on Paris traveled the same path being taken by refugees.

However, Germany, Sweden and all Europe should not succumb to rising xenophobia. As long as the Syrian civil war continues, the refugees will keep coming, and European nations cannot seal themselves off. Nor should the United States, which has been deficient in welcoming refugees from Syria. The only way to truly stop the tide is to stop the war. That should be the focus of European and U.S. policymakers in 2016.