A two-day EU summit on the migrant crisis that starts Thursday centers on efforts to increase cooperation with Turkey to slow the flow of refugees. But whether the incentives Europe is offering to Turkey—home to more Syrian refugees than anyone else—are enough is unclear.

The five-year-long Syrian civil war has created more than 4 million registered refugees. More than 2 million of them live in neighboring Turkey. By contrast, about 507,000 Syrians have applied for asylum in the EU’s 28 states. But Europe, which is seeing more migrants cross its borders than at any time since World War II, is bitterly divided over how to handle the newcomers. The government of some newer EU members such as Hungary have been resistant to the refugees (though others such as Bulgaria have not), and even governments of countries that have been welcoming—like Germany—are finding growing resistance at home, and questions about how the newcomers will affect jobs, schools, and social services.

More than 200,000 people have been killed in the Syrian civil war. Turkey, which does not have the luxury of a body of water separating it from Syria, has had little choice but to take in people fleeing the fighting between President Bashar al-Assad and an array of rebel and militant groups, including the Islamic State. The government in Ankara opposes Assad’s government.

Turkey has spent at least $4.5 billion on its response to the crisis—though other estimates put the figure at $6.5 billion—which includes some of the best facilities for refugees ever built.

“It’s one of the most humanitarian responses I’ve seen anywhere," Rae McGrath, from the U.S. aid agency Mercy Corps, told Reuters. “There is an acceptance that, however inconvenient, Turkey must help its neighbor.”

But Turkey is also feeling the strain from the refugees—especially in towns near the border where Syrian newcomers exceed locals. Sinan Ulgen, chairman of the Istanbul-based Center for Economics and Foreign Policy Studies, told Reuters: “Many people are trying to understand the limits of how much Turkey is prepared to do. I think we are reaching those limits.”

Indeed their presence is becoming an election issue ahead of a vote in November. A plan to allow the refugees to work was shelved because of a backlash, and Turkey is feeling the financial pressure of hosting 2 million people while its own economy sputters.

The bigger threat to Turkey, as Soner Cagaptay wrote in The Atlantic earlier this month, is Russia’s bombing raids in Syria in support of Assad, which threaten to debilitate the moderate rebels and boost the extremists “while leaving Turkey to deal with two unruly neighbors: Assad and ISIS.” Here’s more:

And that same border with Syria offers a gateway for ISIS attacks inside Turkey. In July, after the Islamic State claimed credit for a suicide bombing in the Turkish town of Suruc that killed more than 30 people, Erdogan agreed to open Turkish bases to U.S. planes and drones, and pledged to join the U.S. campaign to bomb ISIS targets in Syria. In doing so, Erdogan has ensured that ISIS sees Turkey as an enemy, and the group will inevitably, and unfortunately, attack Turkey again. The only question is when, and how severely.

Indeed, ISIS is the main suspect in the weekend’s suicide bomb attack on Ankara that killed 97 people and injured 246 others.

Amid this backdrop, EU leaders at the bloc’s two-day summit recognize that there can be no progress on the issue with Turkey.

“Most war refugees that come to Europe travel via Turkey,” German Chancellor Angela Merkel told parliament Thursday. “We won’t be able to order and stem the refugee movement without working together with Turkey.”

Frans Timmermans, the vice president of the European Commission, the EU’s executive body, put it this way: “The EU needs Turkey and Turkey needs the EU.”

The EU summit would, among other things, help Turkey deal with the migrants and patrol the country’s coastline with its permission.

​And what Turkey wants from the EU is this: Money to pay for the refugees it is hosting, visa-free travel for its citizens in the Schengen zone, and progress on its long-stalled application for EU membership. Turkey also wants a safe haven for refugees in northern Syria, but that idea is opposed by Assad and his main ally, Russia.

Whether there’s an agreement will become clear on Friday when European leaders wrap up their summit—the fourth to focus on migrants in six months.