Moroccan migrants rest at a makeshift emergency center at Barbate's municipal sports center, in the south of Spain, after being rescued by Spain's Maritime Rescue Service in the Strait of Gibraltar, TEmilio Morenatti/AP

European leaders reached a hard-fought deal on migration that foresees EU countries voluntarily establishing "controlled centers" on their soil to process migrants rescued at sea while also exploring the possibility of opening migrant centers outside Europe.

The compromise deal, reached in the early hours of Friday, came after more than 12 hours of negotiations as EU leaders met under growing pressure to move towards a solution on migration, which has increasingly been seen as endangering the bloc's very existence.

Under the agreement, EU countries would set up - on a voluntary basis - so-called controlled centers to process migrants' asylum claims. Those deemed eligible would be distributed among member states that voluntarily offer to take migrants.

The EU would also explore options to establish "regional disembarkation platforms" to process migrants outside the bloc - most likely in Northern African countries.

French President Emmanuel Macron, left, speaks with German Chancellor Angela Merkel during a round table meeting at an EU summit in Brussels, Thursday, June 28, 2018. Geert Vanden Wijngaert/AP

German Chancellor Angela Merkel welcomed the agreement, saying that despite the large amount of work to be done before the bloc can achieve a unified asylum system, she was "optimistic after today that we can really continue with the work."

She is under intense pressure from her interior minister, Horst Seehofer, who has given her an end-of-June deadline to reduce the number of asylum seekers entering Germany or risk a government split that could end her four-term reign.

Keep updated: Sign up to our newsletter

Email*

Please enter a valid email address

Please wait…

Thank you for signing up.

Oops. Something went wrong.

Thank you,

Austrian Chancellor Sebastian Kurz said that the deal would allow the EU to better protect its borders because, for the first time, it makes processing centres for migrants outside the EU a possibility.

"We have long been calling for these protection areas, safe zones, landing centers, however one wants to call them, outside of Europe - this idea has now prevailed," Kurz said.

The deal was mainly pushed by Italy, led by the newly inaugurated Prime Minister Giuseppe Conte, which threatened to veto summit conclusions until the bloc's 28 leaders reached a common understanding on migration.

Here are the key details of the deal:

1. The European Council reconfirms that a precondition for a functioning EU policy relies on a comprehensive approach to migration which combines more effective control of the EU's external borders... This is a challenge not only for a single Member State, but for Europe as a whole.

2. The European Council is determined... to prevent a return to the uncontrolled flows of 2015 and to further stem illegal migration on all existing and emerging routes.

3. As regards the Central Mediterranean Route, efforts to stop smugglers operating out of Libya or elsewhere should be further intensified. The EU will continue to stand by Italy and other frontline Member States in this respect.

4. As regards the Eastern Mediterranean Route, additional efforts are needed to fully implement the EU-Turkey Statement, prevent new crossings from Turkey and bring the flows to a halt... More efforts are urgently needed to ensure swift returns and prevent the development of new sea or land routes... In the light of the recent increase in flows in the Western Mediterranean, the EU will support, financially and otherwise, all efforts by Member States, especially Spain, and countries of origin and transit, in particular Morocco, to prevent illegal migration.

5. In order to definitively break the business model of the smugglers, thus preventing tragic loss of life, it is necessary to eliminate the incentive to embark on perilous journeys. This requires a new approach based on shared or complementary actions among the Member States to the disembarkation of those who are saved in Search And Rescue operations. In that context, the European Council calls on the Council and the Commission to swiftly explore the concept of regional disembarkation platforms, in close cooperation with relevant third countries as well as UNHCR and IOM. Such platforms should operate distinguishing individual situations, in full respect of international law and without creating a pull factor.

6. On EU territory, those who are saved, according to international law, should be taken charge of, on the basis of a shared effort, through the transfer in controlled centers set up in Member States, only on a voluntary basis, where rapid and secure processing would allow, with full EU support, to distinguish between irregular migrants, who will be returned, and those in need of international protection, for whom the principle of solidarity would apply. All the measures in the context of these controlled centers, including relocation and resettlement, will be on a voluntary basis, without prejudice to the Dublin reform.

7. The European Council agrees on launching the second tranche of the Facility for Refugees in Turkey and at the same time on transferring 500 million euro from the 11th EDF reserve to the EU Trust Fund for Africa.

8. Tackling the migration problem at its core requires a partnership with Africa aiming at a substantial socio-economic transformation of the African continent...

9. In the context of the next Multiannual Financial Framework, the European Council underlines the need for flexible instruments, allowing for fast disbursement, to combat illegal migration. The internal security, integrated border management, asylum and migration funds should therefore include dedicated, significant components for external migration management.

10. The European Council recalls the need for Member States to ensure the effective control of the EU's external borders with EU financial and material support. It also underlines the necessity to significantly step up the effective return of irregular migrants.

11. Concerning the situation internally in the EU, secondary movements of asylum seekers between Member States risk jeopardizing the integrity of the Common European Asylum System and the Schengen acquis.

Member States should take all necessary internal legislative and administrative measures to counter such movements and to closely cooperate amongst each other to that end.

12. As regards the reform for a new Common European Asylum System, much progress has been achieved... A consensus needs to be found on the Dublin Regulation to reform it based on a balance of responsibility and solidarity, taking into account the persons disembarked following Search And Rescue operations.

Haaretz.com, the online edition of Haaretz Newspaper in Israel, and analysis from Israel and the Middle East. Haaretz.com provides extensive and in-depth coverage of Israel, the Jewish World and the Middle East, including defense, diplomacy, the Arab-Israeli conflict, the peace process, Israeli politics, Jerusalem affairs, international relations, Iran, Iraq, Syria, Lebanon, the Palestinian Authority, the West Bank and the Gaza Strip, the Israeli business world and Jewish life in Israel and the Diaspora.