Migrants warm themselves with a fire in a makeshift migrant camp near Calais, France, on Oct. 16. (Thibault Camus/AP)

As Europe reels from a historic rush of migrants, leaders are searching for new ways to reverse the flow by stepping up deportations.

The quest led to a deal with Afghanistan that envisions a whole new terminal at the Kabul airport to take deportees. It sent German Chancellor Angela Merkel last week on a whistle-stop tour of African capitals, where she promised an influx of euros in exchange for willingness to take back migrants. And it resulted in an agreement with Turkey that critics say means European nations are biting their tongues about Ankara’s human rights abuses to halt the flow of refugees to Greece.

The efforts come amid a global backlash to immigrant flows, which have been increased by war and poverty. In the United States, Republican presidential nominee Donald Trump has built his fiery candidacy on an anti-Mexican, anti-Muslim message. In Britain, the government floated a plan to force businesses to declare how many noncitizens they employ following the June vote to sever ties with the European Union. And across Europe, populist anti-migrant parties are surging in the polls.

With the increased cross-border traffic, countries are struggling to deal with the people they have rejected for asylum. Until now, many people who are inside Europe illegally have been able to remain in a limbo that can stretch for years. But that old, lenient model — which has commonalities with that in the United States — is giving way to mounting anti-immigrant pressure.

The risks are significant. If Europe significantly steps up deportations to unstable nations, it could further destabilize those governments, setting off a reaction in which yet more people could flee for safer shores. But E.U. leaders are laying the groundwork to do it despite the fears.

“We had to find ways to stop illegal migration,” Merkel said during a trip to Ethiopia, where she balanced criticisms of a fresh government crackdown on the opposition with bargaining over doing more to stop migrant flows to Europe. “That is why we said, ‘We must speak to Turkey,’ because many of these people came from there. We also have to speak with African countries to bring about legality.”

European countries are increasingly making clear that their aid comes with strings attached. Merkel, who will face voters next year, is under pressure to show toughness against migrants after she threw open Germany’s doors last year to a wave of refugees from the Syrian conflict. French President François Hollande is also gearing up for a campaign that is expected to turn on terrorism and migration issues.

The shift could blunt European soft power across the developing world; E.U. leaders had long prided themselves in being less transactional and more idealistic in dealing with development aid than their counterparts in the United States. 

Among policymakers, “the idea is if we are spending all this money, why should we not have them also cooperate on deportations?” said Elizabeth Collett, director of Migration Policy Institute Europe, a Brussels-based think tank. “Over the last six to 12 months, the idea has gained a lot of ground.” 

In Africa, E.U. diplomats have been working to strike bargains with Mali, Senegal, Niger and Nigeria, which along with Ethiopia are major sources of economic migrants to Europe. Ethiopia recently declared a national state of emergency, spurring international concerns that the government is engaged in harsh retaliation against its opponents.

In Turkey, a springtime deal that all but halted migrant flows to Greece is imperiled following the government’s harsh response to a July coup attempt. E.U. leaders pledged $6.7 billion in aid plus visa liberalization for Turkish citizens in exchange for Turkey’s willingness to take back migrants who landed in Greece.

The agreements have sparked criticism from human rights advocates who say that the world’s largest economic bloc is abdicating its responsibility to help other nations in need.

How the world is heeding the call to ‘build that wall’

“The E.U. is pushing people back, keeping people out, instead of using its power to help legal returns and offer support,” said Iverna McGowan, the head of Amnesty International’s European Institutions Office.

But Afghanistan is the most unstable of the nations with which Europe has pursued migration-related deals, even as leaders have tried to paint a bright picture of the situation.

“It’s a sense of partnership that provides us space for working together,” E.U. foreign policy chief Federica Mogherini said last week of the E.U. deal with Afghanistan, which committed the war-torn country to accepting an unlimited number of deportees from Europe. The terms of the deal were announced the same day that the E.U. pledged Afghanistan $1.5 billion of development aid a year through 2020.

Mogherini said there was no connection, but Afghan officials said they had been pressured to make the deportation deal in exchange for financial support, and German Foreign Minister Frank-Walter Steinmeier said his nation’s pledge of $470 million a year was indeed connected to migration issues.

“Both sides will explore the possibility to build a dedicated terminal for return in Kabul airport,” according to the text of the agreement, which lays out tough terms for the Afghan government while offering few obvious benefits in return. Last year, 3,290 Afghans were deported from Europe, according to E.U. figures. Internal E.U. documents leaked in March suggest leaders would like to clear out as many as 80,000 more Afghans.

Defenders of the deals say that Europe’s asylum system should be equipped to deal with these challenges. Under internationally practiced asylum law, people who would face danger at home should not be sent back. They would be able to make that case in court.

But there are obvious gaps in the system: In 2015, for example, 60 percent of Afghan asylum applicants in the E.U. were granted protection, according to the U.N. refugee agency. This year, that number has dropped to 35 percent, even though the situation in Afghanistan has deteriorated, suggesting that the courts are facing political pressures.

“If the bar is being raised and it’s much harder for Afghans to get protection in Europe, that would be a concern,” said William Spindler, a spokesman for the U.N. refugee agency. The agency has declined to issue a blanket warning that anybody leaving Afghanistan should automatically be considered a refugee. People who leave for economic reasons are not considered to have a right to stay in other countries.

On a more basic level, the Afghanistan deal has the potential to cast more Afghans back into a nation that is convulsing in a worsening conflict. 

“It’s not unlawful, but it makes no sense to do so if the E.U. wants to stabilize Afghanistan,” said Gerry Simpson, a senior researcher on refugees at Human Rights Watch. “By doing this, they are fueling the flames for the situation on the ground and for more Afghan refugees to come.”