European Union leaders have reached an agreement on migration after nearly 10 hours of talks at a summit in Brussels.
Italy - the entry point of thousands of migrants, mainly from Africa - had threatened to veto the conclusions of the group's entire agenda if it did not receive help on the issue.
Talks continued into the early hours of Friday before a compromise was reached.
Leaders said that new migrant centres could be set up in EU countries on a "voluntary" basis.
These centres would process migrants to determine which are genuine refugees and which are "irregular migrants, who will be returned", the text of their agreement says.
The joint communique also speaks of restricting the movement of asylum seekers between EU states.
"After this European summit, Europe is more responsible and offers more solidarity," said Italian Prime Minister Giuseppe Conte. "Today Italy is no longer alone."
German Chancellor Angela Merkel came into the summit needing an EU-wide agreement on dealing with asylum seekers to avert a political crisis at home that could bring down her government.
It is unclear whether the measures agreed will be enough, and speaking to reporters at 05:00 local time (03:00 GMT), she acknowledged the EU still had "a lot of work to do to bridge the different views".
The bloc is deeply divided over the migration issue, with several Central European states rejecting an EU scheme to relocate 160,000 refugees from overcrowded camps in Greece and Italy.
Following the marathon talks, which broke up not long before sunrise, France's President Emmanuel Macron said that "European co-operation enabled this".
The 28 EU leaders also agreed to strengthen external border controls, and boost financing for Turkey and countries in North Africa.
So-called "regional disembarkation platforms", which are aimed at breaking the business model of people-smuggling gangs by processing refugees and migrants outside the EU, will also be "swiftly explored".
However getting North African countries to host such centres could be very difficult and Morocco again on Thursday rejected the idea.
Friday's agreement also states that there is an urgent need to boost efforts to "prevent the development of new sea or land routes" into Europe.
Italian Prime Minister Giuseppe Conte had earlier taken the rare step of blocking the conclusions of the joint communique until the leaders had settled the migration issue. Both Italy and Greece want other countries to share the burden.
German Chancellor Angela Merkel had said that the migration issue could be a defining moment for the EU.
Mrs Merkel came into the summit under pressure to come up with a deal to prevent new arrivals in Germany by migrants who have already registered elsewhere.
Interior Minister Horst Seehofer, from her Bavarian coalition partner the CSU, had given her a deadline of this weekend. He has threatened to start turning away migrants from the border in his home state.
Without the CSU, Mrs Merkel would lose her parliamentary majority.
The migrant flows include refugees fleeing the Syrian war and other conflicts, urgently seeking asylum, BBC reported.
It is not a crisis on the scale of 2015, when thousands were coming ashore daily on the Greek islands. The European Council - the EU's strategic leadership - says the numbers illegally entering the EU have dropped 96 per cent since their peak in October 2015.
But this month's tensions over migrant rescue ships barred from entry to Italian ports - most recently the German charity ship Lifeline - have put the issue firmly back in the EU spotlight.
The Lifeline was only allowed to dock in Malta after intense diplomacy among several EU states, who each agreed to take a share of the migrants on board. Malta said that Norway had now also agreed to take some migrants from the Lifeline.
© 2017 - All Rights with The Financial Express