European Union leaders have averted the collapse of a key summit with a deal struck on migration in the early hours of Friday which could see the burden of resettling refugees shared more widely among member states.
After marathon talks, EU leaders agreed -- but only on a voluntary basis -- to set up "controlled" migrant processing centers within Europe which would swiftly distinguish between genuine asylum seekers and "irregular migrants, who will be returned."
However, the deal was thin on detail about how this would work or which countries would take in asylum seekers.
The EU will also look into setting up migration centers in countries outside Europe, according to the European Council. These are likely to be in North African countries, with the aim of breaking the business model of human traffickers who ship migrants across the sea to Europe.
Hours after the deal was struck, a rubber boat carrying migrants capsized off the Libyan coast with 100 or more people feared dead, Libyan Navy spokesman Ayoub Qassim told CNN.
The UN migration agency, the International Organization for Migration (IOM), told CNN that a rescue operation was ongoing but only 14 people had been saved. "The bodies of three children under the age of five have been retrieved. How many missing or dead total, we don't know for now," said the IOM's Libya spokeswoman Christine Petre.
The meeting of European leaders, intended to focus on Brexit, was dominated Thursday by the issue of how to deal with the arrival of boatloads of desperate migrants seeking safety or a better life in Europe.
Italy -- whose new government has closed ports to ships rescuing migrants undertaking the dangerous Mediterranean crossing from north Africa -- had threatened to block a deal if migration was not addressed, a diplomat told CNN on Thursday.
At around 5 a.m. Brussels time Friday, European Council President Donald Tusk tweeted that leaders had agreed on a joint statement from the EU28 summit that included a settlement on migration.
Italian Prime Minister Giuseppe Conte said the deal took "long negotiation, but from today Italy is no longer alone."
However, Italy's hardline Interior Minister Matteo Salvini reacted with caution Friday, saying that as a former Member of the European Parliament "I don't trust what's said in words, I only trust what's put on paper."
Speaking to Italian radio station Radio Capital, he called for more details on the principles, money and manpower involved, saying that in many supposedly international operations Italy had borne most of the cost.
Macron: 'European solution'
In a statement, the Council said it had agreed to adopt a "comprehensive approach to migration that combines more effective control of the EU's external borders, increased external action and the internal aspects, in line with our principles and values."
It added: "The European Council is determined to continue and reinforce this policy to prevent a return to the uncontrolled flows of 2015 and to further stem illegal migration on all existing and emerging routes."
The Council said more support would be provided to Italy and other Mediterranean countries, and "efforts to stop smugglers operating out of Libya or elsewhere should be further intensified."
It also stressed that despite a recent uptick in Mediterranean crossings, measures already taken meant the number of detected illegal border crossings into the EU had fallen by 95% from its peak in October 2015.
British Prime Minister Theresa May praised the agreement, saying it addressed many issues the UK had previously raised, and would "ensure that people aren't making these dangerous journeys ... in the hands of people smugglers."
French President Emmanuel Macron said that despite suggestions a deal would be "impossible," member states had succeeded in reaching a "European solution."
The leaders were meeting Friday for a second day, without May present, to discuss Brexit and reform of the eurozone.
Conclusions adopted by the Council on Brexit urged the UK government to step up its efforts on negotiating the withdrawal agreement and provide "further clarity as well as realistic and workable proposals" as regards its position on the United Kingdom's future relationship with with bloc.
The European Council also said leaders had agreed to extend sanctions on Russia for another six months over its 2014 annexation of Crimea from Ukraine.
Despite EU leaders' broad welcome for the migration deal, many questions remain unanswered.
The Council said it would work closely with the IOM and the UN refugee agency, UNHCR, as well as relevant third countries to explore the proposal for "regional disembarkation platforms" where migrants would be assessed before they get close to setting off for Europe by sea.
However, it's not yet clear whether Libya and other north African nations are willing or capable of setting up such a system. Libyan deportation centers are rife with abuse, rights groups say, and a CNN undercover investigation last year revealed cases of migrants being sold at slave auctions.
In a statement, the IOM and UNHCR said they "stand ready to support a common approach, and call on all countries in the Mediterranean region to come together to implement a predictable and responsible disembarkation mechanism in a manner that prioritizes human rights and safety first."
The IOM also tweeted that the situation was "not a migration crisis, rather a humanitarian one," with more than 16,000 migrants dead or missing at sea since 2014.
The EU document, which often refers to shared or voluntary efforts, also does not explain on what basis refugees will be resettled across the bloc if they reach migrant processing centers on European soil, or how this will be done more swiftly than at present.
Some states, particularly in eastern Europe, have fiercely resisted mandatory quotas for EU nations to take in refugees.
In an impassioned speech ahead of the summit, German Chancellor Angela Merkel said migration could be a "make or break" issue for the European Union.
"We cannot leave those countries where asylum seekers arrive to deal with (the problem) alone," she told the German Parliament in Berlin.
While the deal agreed in Brussels should be enough to get the Chancellor through her current political crisis, critics will want to see concrete progress.
Merkel became the accidental architect of European migration policy in 2015 when she decided to allow hundreds of thousands of asylum seekers who had crossed the Balkans on foot into Germany.
In an interview with CNN this week, Salvini said "we need to revisit" the Dublin Regulation, which requires asylum seekers to be registered in the first European country they enter -- regardless of whether they entered legally or otherwise.
The Dublin rules have put a huge amount of pressure on southern and eastern European nations, where the vast majority of refugees fleeing war and unrest in the Middle East and North Africa first enter the Union, and meant richer countries in northern and western Europe have borne less of the burden.
Despite a significant drop in the number of people seeking refuge in Europe, thousands of desperate migrants continue to make their way to European shores. Many make the perilous journey on dangerously overcrowded boats.
As of June 6, some 33,400 migrants and refugees had reached Europe by sea, the IOM said, most of them arriving through Greece, Italy and Spain. The estimated number of deaths stood at 785.
This week, a search and rescue ship was stranded in the Mediterranean for five days with 233 migrants on board before it was finally permitted to dock in Malta.
European governments had wrangled over who held responsibility for migrants arriving on the continent's southern shores as conditions on the ship began to deteriorate.
Growing concern over migration comes at a time when Europe is already dealing with a lingering debt crisis, a rise in European populism, an escalating trade war with the United States, questions over Washington's commitment to NATO and faltering negotiations for Brexit.