Italy's anti-immigrant government has ended a standoff at the Sicilian port of Catania and allowed 150 rescued migrants off the coastguard ship that rescued them and onto Italian soil.
The government had refused to let them off the boat until other EU states agreed to take some of them in.
Albania, which is not a member of the EU, has agreed to accept 20 migrants whilst Ireland was the only EU state to offer to help; it will take in between 20 and 25 migrants.
Italy's Catholic church will take in the remainder.
"The church has opened its heart and opened its wallet," interior minister Matteo Salvini told supporters at a rally in Pinzolo in northern Italy on Saturday evening. He said it would be at "zero cost to the Italian taxpayer."
The migrants are mostly from Eritrea, a country frequently described as the "North Korea of Africa" since its human rights record is so poor. Many are likely to be bona fide refugees.
Rome has repeatedly said Italy will "no longer be Europe's refugee camp" and Salvini was unrepentant about having detained them on board the ship that rescued them for five days.
He is now under investigation by a Sicilian prosecutor for abuse of office, kidnapping and illegal arrest.
In a Facebook post he said: "If you want to question me or maybe arrest me because I defend the borders and security of my country, I am proud of it and waiting for it."
On Saturday, the United Nations had called for reason from all sides after a meeting of envoys from 10 EU states in Brussels a day earlier failed to break the deadlock.
"Frightened people who may be in need of international protection should not be caught in the maelstrom of politics," the U.N. refugee agency UNHCR said in a statement.
The agency appealed to EU member states to "urgently" offer relocation places to the rescued people, in line with an agreement at an EU summit in June, and in the meantime, urged Italy to allow "the immediate disembarkation of those on board."
Prime Minister Giuseppe Conte attacked the EU for not helping resettle the migrants and said Italy may refuse to back the bloc's budget which is currently under discussion.
He said on Facebook that Friday's meeting in Brussels had been "a defeat for Europe", and "a clear violation of the spirit of solidarity" that should be a founding principle of the Union.