"(The) agreement isn't a silver bullet, but part of EU's comprehensive strategy on migration," European Council President Donald Tusk tweeted Friday.
The deal came after talks involving Turkish Prime Minister Ahmet Davutoglu, Tusk and a handful of other key European officials. The final language was then put up for a vote before representatives from the 28 European Union member states, who approved it unanimously, according to the European Council president.
The talks were held to address the largest influx of refugees into Europe since World War II, though the more than 1 million people who have fled to there pale compared to the more than 2.7 million registered in Turkey alone. The discussions could be significant for Turkey not only in receiving financial aid to deal with this problem, but also expedite its push to join the 28-member European Union.
On Thursday, Tusk laid out three guiding principles for his side: Any agreement must be acceptable to all EU members; it must comply with international and EU law; and it must be part of a comprehensive strategy.
Davutoglu told reporters in Brussels just prior to Friday's talks that he hoped to achieve "our goal to help all the refugees, as well as to deepen Turkish-EU relations -- which is ... good news for our continent and for humanity altogether."
The ultimate agreement, according to Tusk, is a "balanced proposal that takes on board Cypriot concerns" and addresses Turkey's accession into the European Union. It will be phased in gradually starting Sunday "based on (the) 1-for-1 principle" -- meaning that for every refugee resettled in Turkey, one will go from Turkey to Europe.
"Every migrant in Europe," Tusk said, "(will be) treated individually, with full respect & dignity."
EU-Turkey proposal: 5 questions
This crisis has put leaders around Europe on the spot.
Some have been reluctant if not downright defiant to allowing people in from impoverished and war-torn areas, fearing the economic burden and that some could be terrorists waiting to attack. Others have been more welcoming on humanitarian grounds, saying that turning away people who'd fled such horrors is inhumane.
Which countries do, don't take refugees
The latter argument is underscored by what's been happening the last few years on the Mediterranean Sea, where refugees put their lives in the hands of human smugglers who transport them in cramped, unsafe boats. The International Organization for Migration reported more than 3,700 migrants died at sea last year while trying to reach Europe. So far this year, the same group says there have been over 465 more deaths.
Many of those who make it end up along the coast of Greece, though they may not be there for long.
Outlines of the possible agreement that was discussed Friday in Brussels called for moving migrants who came from Greece via Turkey back to Turkey. Europe will get a corresponding number of refugees in return.
Exclusive: The truth about Syria
Turkey faces other issues as well
The agreement isn't just about refugees. It also addresses Turkey's push to join the European Union, including a desire to have its citizens be able to travel through Europe without visas in the coming months.
"Turkey's EU relationship and Turkey's membership (in the) EU is important not only for Turkey and the EU, but for all international issues," Davutoglu told reporters Friday.
And dealing with refugees isn't the only challenge facing Turkey.
The country is also facing a growing terrorist threat, both by ISIS and militant Kurds as illustrated by recent deadly bombings. President Recep Tayyip Erdogan has been dogged by criticism that he's been too heavy-handed in going after Kurds, calling his military's actions unfair collective punishment for the actions of a few, as well as that he's gone too far in cracking down on independent media.
Merkel alluded to Turkey's issues while addressing her nation's legislature earlier this week. She talked about "deepened cooperation" with Turkey and called Ankara's "demand for more financial help completely understandable."
At the same time, she said any discussions about migrants shouldn't take place in a vacuum. The other things happening in Turkey -- including criticisms of rights violations and its crackdown on Kurds -- matter, too.
"It ... goes without saying that we stress to Turkey, for example, the importance of freedom of the press (and) the freedom of the Kurds," Merkel said Wednesday. "As important as the necessary fight against ... terror is, (Turkey must take a measured) approach ... for all Kurds."
Kurdish rebels claim deadly Ankara blast as strain on Turkey grows