EU leaders have reached a deal on the migration crisis after long talks at the summit in Brussels.
Italy, which is a common entry point for African migrants crossing the sea, demanded help in dealing with the crisis.
Countries have agreed on a solution that will see new migrant centres set up voluntarily in EU countries to process genuine refugees and "irregular migrants, who will be returned".
Resettlement of refugees around the EU will also take place on a voluntary basis.
No more details were released on which countries would set up the migrant centres.
Taking action in countries of origin
Prime Minister Theresa May said: "It is just after 5am, we have had very lengthy discussions, but lengthy discussions on the important subject of migration.
"And we have come to positive conclusions, a lot of them around what the United Kingdom has been encouraging for some time, which is taking more action upstream in countries of origin so that we can ensure that people aren't having to make and aren't making these very dangerous journeys, often travelling many miles, often at the hands of the people smugglers and making the dangerous trips across the Mediterranean where we still see some people dying."
According to the European Parliament, there were 728,470 applications for asylum in the EU last year, down from 1.3 million in 2016.
Some 538,000 people were granted asylum in 2017 with one in three being from Syria. 70% of the Syrian applicants were given asylum in Germany.
UK and EU co-operation must continue
On Brexit, May said at the European Council summit she had been "stressing that we want a deal that's going to work for the UK and for our European partners, and that if we work together, we can support each other's prosperity and security".
May also warned EU leaders that citizens' safety could be put at risk unless the UK was allowed to participate in European schemes to share information about criminals and suspects.
"We currently enjoy a high level of co-operation with member states of the EU in a number of areas on security that are important for our citizens," she said.
"This is what is at stake and I want to see a strong and deep security partnership continuing with our European Union partners."