The chaos of thousands of refugees arriving on the Greek islands daily may soon slow if the European Union and Turkey can implement a plan to keep them from coming to Europe.

The deal, which has been in the works for months, calls for the European Commission to give Turkey up to €3 billion to step up coast guard patrols, arrest more smugglers and build six additional reception centers along its southern border with Syria. In return, Turkey has asked for visa-free travel to Europe for its 75 million citizens and the reopening of its long-stalled EU accession talks.

Turkey hosts more refugees than any other country in the world.