The announcement was part of a list of conclusions released after the inaugural day of a Brussels European Council that ran well into the early hours of Friday morning due to a tardy resolution to the discussions that was indicative of the polarized opinions on immigration within the bloc, Efe reported.
Where would the centres be built?
"As for the text of our compromise, the leaders accepted three proposals I put forward", he said, specifying "disembarkation platforms outside Europe, a dedicated budgetary tool in the next MFF [multiannual financial framework] to combat illegal migration, as well as boosting European Union support for the Libyan Coast Guard".
"It's simply about pushing migrants out of our sight so we don't have to look at the camps in Greece, or in Italy or on our borders in Calais", Asad Rehman, executive director of anti-poverty charity War on Want, told Sky News.
Plans involve the establishment of closed migrant centres in European Union states to process asylum claims and decide whether applicants have a right to remain or be sent home.
Merkel's political future at home is also at stake and she issued a rallying call to the other European leaders to back her stance.
Twelve hours after talks began, EU President Donald Tusk said on Twitter that "EU28 leaders have agreed on. conclusions" including migration.
After the announcement of the deal, Italian Prime Minister Giuseppe Conte said: "Today Italy is no longer alone".
"Migration could end up determining Europe's destiny", warned German Chancellor Angela Merkel before the meeting, in an echo of similar political divisions in the United States over migration across its southern border.
The EU27 welcomed progress on the legal text of the withdrawal agreement but noted that "important aspects still need to be agreed" including the territorial application of the deal "notably as regards Gibraltar" - a provision thought to have been inserted at the insistence of Spain.
Earlier in the evening, Italy's had refused to sign the joint conclusions - which also touched on defense, trade and technology - amid concerns that the bloc wasn't doing enough to relieve the burden of migration in front-line Mediterranean countries.
The EU leaders, meanwhile, offered a concession to German Chancellor Angela Merkel, who faces a rebellion from within her own coalition government, with moves to stop migrants registered in Italy and other EU countries from moving to Germany.
CSU lawmaker Hans Michelbach told ARD television areas of the deal would be "difficult to implement" and that Ms Merkel would have to discuss it with CSU leader, Horst Seehofer, in the coming days.
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 European Union spotlight.
Earlier, those leaders agreed that the US import tariffs imposed on EU steel and aluminium could not be justified and supported the European Commission's legal challenge and the duties set on USA products.
Also, Leonard Doyle of the UN's International Organisation for Migration said that "any solution needs to be a European solution".
New money for the EU-Turkey deal?
"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.