European Union leaders have reached an agreement on migration after almost 10 hours of chaotic talks in Brussels over the sensitive issue threatening their union and zone of free travel, as well as German Chancellor Angela Merkel’s government.

“EU28 leaders have agreed on (summit) conclusions, including on migration,” the chairman of the talks, Donald Tusk, said.

Italy had earlier blocked any agreement at the summit – which was also about trade and security, among other things -unless EU peers meet its demands over migration.

Italy’s Prime Minister Giuseppe Conte said he was satisfied by a deal.

“It was a long negotiation but from today Italy is no longer alone.”

He listed the elements of the agreement, including the possibility of setting up migrant centres in EU countries to decide on asylum requests, but he made it clear Italy had not yet decided on whether to have such a site on its territory.

“It is a decision that we will take together in the government. We are not at all urged to do so,” Conte told reporters after attending his first EU summit.

French President Emmanuel Macron said the deal showed “European cooperation” had prevailed over national interests:

“Europe will have to live with migratory pressures for a long time. We must succeed in standing up to this challenge whilst being true to our values.”

German Chancellor Angela Merkel acknowledged that deep divisions remained among member states:

“Overall, after an intensive discussion on the most challenging theme for the European Union, namely migration, it is a good signal that we agreed a common text,” Merkel said.

“We still have a lot of work to do to bridge the different views,” she added.

The euro jumped as much as 0.6 percent on Friday after news that a deal had been reached.