Next week, President Recep Tayyip Erdogan of Turkey will visit Brussels and tell his European Union counterparts that Europe must act decisively if it wants to stop the massive flow of refugees leaving his country and entering the European Union by land and sea. Turkey is willing to help halt the exodus, but the union cannot expect it to do so if European governments offer Turkey little in return.

Unlike Europe, Turkey decided to adopt an open-door policy for refugees at the beginning of the Syrian crisis in 2011. It did so out of humanitarian concern and a misplaced optimism about the weakness of the Assad regime. But now the refugee population in Turkey has grown to approximately two million.

Turkey’s ability and willingness to accept this huge number seems to have lulled European policy makers into complacency. Their vision for dealing with the tragic consequences of the Syrian war has, it seems, been limited to hoping that Turkey will act as an eternal buffer zone for Europe. That is a pipe dream.

Turkey cannot be the solution for the European Union’s inability to act collectively to address the enormity of this humanitarian tragedy and develop policies to share the burden. Nor can Europe continue to benefit from having Turkey serve as a buffer zone while Ankara shoulders the massive financial and social cost of hosting millions of Syrians.

Last week, President François Hollande of France met the Italian prime minister, Matteo Renzi, and declared that Europe must work with Turkey to ensure the refugees can stay there, find jobs and wait for the situation in Syria to improve. This is a fantasy. European leaders need to abandon such thinking immediately if Europe and Turkey are ever going to tackle this crisis together.

Turkey cannot forever act as the gatekeeper of Europe. Building a genuine partnership between the European Union and Turkey to address the long-term challenge of the refugee crisis will require overhauling not only Europe’s approach to migration but also its approach to eventual Turkish membership in the union.

First, Europe must accept the inevitability of resettlement. Recent efforts by the European Commission, with the backing of Chancellor Angela Merkel of Germany, are a step in the right direction. A plan to distribute incoming refugees among member states is inevitable, not only for ethical reasons but also in order to protect the hard-fought gains of European integration such as the visa-free Schengen zone.

Second, Turkey and the European Union should develop a joint long-term strategy for the integration of Syrian migrants. So far, the Turkish approach has focused on the management of 27 refugee camps, catering to the needs of almost 300,000 people in the country’s southeast. But the rest of the Syrian population in Turkey, more than 1.7 million, is spread across the country. They enjoy little support and their living conditions are deteriorating. The real challenge is to provide these people with prospects for a decent life and protection. Failing to do so would not only increase the outflow toward Europe but could also lead to radicalization within this distressed population, with detrimental consequences for both Turkish and European security.

Given the large-scale demand for health, education and skill-and-language training, the European Union should invest much more heavily to help Turkey scale up its institutional capacity to deliver these services. At the same time, Turkey should finally acknowledge the severity of the challenge that it is facing and accept the international community’s offer to provide assistance.

Finally, resolving this crisis will require an overhaul of the European Union’s approach to Turkey. The Turkish government’s response to the refugee crisis — and its willingness to absorb huge numbers of Syrians — has proved that Turkey’s help can be invaluable for Europe. But acrimony over Turkey’s stalled E.U. accession process remains an impediment to genuine cooperation. As long as Turks do not believe that, one day, they too can be part of the E.U. family, cooperation between Ankara and Brussels is bound to remain shallow and vulnerable to political cycles. The ball is now in Europe’s court; European leaders should decide whether they are willing to gradually lift the obstacles to eventual Turkish accession.

As Mr. Erdogan goes to Brussels, one major question will be whether Turks could soon start to enjoy visa-free travel to Europe. Turkey is the last European country eligible for E.U. accession that remains constrained by onerous visa requirements. Although a process for the lifting of visa restrictions was initiated a year ago, it is doubtful whether European leaders, caught in a wave of Islamophobic anti-immigration sentiment, will ever come to terms with the idea of offering visa-free travel to 75 million Turks.

But before these European leaders once again refuse Turkey’s minimal demands on visa restrictions, they should consider what Turkey has already been providing them. For Europe to carry out its plan for the resettlement of limited numbers of refugees, it desperately needs Turkey to improve its border security in order to stem the further outflow of refugees. The only incentive that will ensure Turkey’s long-term cooperation is visa-free travel for its own citizens. To put it bluntly, European leaders must now choose between allowing Turkish citizens to travel legally to the European Union, or face the prospect of hundreds of thousands more refugees and migrants leaving Turkey and illegally entering Europe.

This article was originally published in the New York Times.