Secure centres for migrants may be set up in EU states to process asylum claims under a deal reached after marathon talks at a summit in Brussels.
The controlled centres would be set up by EU states on a voluntary basis and migrants whose claims were rejected would be “returned”.
Refugees could be resettled in EU states which agreed to take them.
The deal follows weeks of diplomatic wrangling over migrant rescue ships, and which country should take them in.
Coastguard officials said on Friday that around 100 people were thought to have drowned off the Libyan coast, with 14 rescued.
They were found in waters to the east of the capital, Tripoli.
Where would the centres be built?
There were no details on which countries might set up the secure centres or take in refugees, but French President Emmanuel Macron said they would be in countries where migrants first arrived in the EU.
“We have struck the right balance between responsibility and solidarity,” he said.
Numbers illegally entering the EU have dropped 96% since their 2015 peak, the European Council says.
Italy – the entry point for thousands of migrants, mainly from Africa – had threatened to veto the summit’s entire agenda if it did not receive help.
“After this European summit, Europe is more responsible and offers more solidarity,” said Italian Prime Minister Giuseppe Conte. “Today Italy is no longer alone.”
Other leaders struck a more cautious note.
German Chancellor Angela Merkel said more needed to be done to resolve disagreements.
And European Council President Donald Tusk said it was “too early to talk about a success”.
“We have managed to reach an agreement in the European Council. But this is in fact the easiest part of the task, compared to what awaits us on the ground when we start implementing it,” he told a news conference.
Whose needs does the deal meet?
Mr Conte had earlier taken the rare step of blocking the conclusions of the joint communiqué until the leaders had settled the migration issue. Both Italy and Greece want other countries to share the burden.
However several Central European states have so far rejected an EU scheme to relocate 160,000 refugees from overcrowded camps in Greece and Italy.
German Chancellor Angela Merkel had said that the migration issue could be a defining moment for the EU – but she also needed the summit to avert a political crisis at home that could bring down her government.
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 who have already registered elsewhere from the border in his home state.
Without the CSU, Mrs Merkel would lose her parliamentary majority.
After the talks, she acknowledged the EU still had “a lot of work to do to bridge the different views”.
About 56,000 migrants have arrived in Europe so far this year, the International Organization for Migration says. More than a million people arrived in 2015.
This month’s tensions over migrant rescue ships barred from entry to Italian ports – most recently 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 some of the migrants on board. Malta said Norway had now also agreed to take a share.
Medical charity Medecins Sans Frontières (MSF) branded the new EU deal inhumane.
“The only thing European states appear to have agreed on is to block people at the doorstep of Europe regardless of how vulnerable they are, or what horrors they are escaping – and to demonise non-governmental search and rescue operations,” MSF’s emergencies chief Karline Kleijer said.