The boat docked at Catania port on Monday but Italy had refused to let those on board disembark in the absence of any EU commitment to relocate them, prompting a new bitter row with Brussels.
But following a deal brokered by the Catholic Church late on Saturday, Italy's far-right Interior Minister Matteo Salvini agreed to allow them to leave the Diciotti, the Italian coastguard ship which rescued them some ten days ago.
There were initially around 180 migrants on board when it arrived at Catania, but Rome allowed 27 unaccompanied minors to disembark on Wednesday and a dozen women and men left the boat Saturday following a request from health authorities.
Albania, which is not a member of the EU, was the first to offer safe haven to 20 of the migrants.
The migrants disembarked several hours after Sicilian prosecutors said they had opened an inquiry into Salvini for “illegal confinement, illegal arrest and abuse of power” over his refusal to allow the migrants to disembark, media reports said.
EU migration commissioner Dimitris Avramopoulos welcomed the deal, saying it was the result of “solidarity across borders and communities”.
“But we cannot always wait for this type of goodwill solidarity. We need to have structural measures,” he said in a statement.
A warning to Italy
The Diciotti standoff was the latest in a string of incidents involving Italy's recently-installed populist government, which has increasingly refused to take in boats carrying migrants rescued off Libya, prompting sharp divisions across the EU.
On Friday, Rome threatened to pull funding for the EU unless it agreed to take in some of those on board the Diciotti.
But Avramopoulos warned that Italy would end up “shooting itself in the foot” by its ongoing attacks over the bloc's policies on migrants.
“I think that politicians in your country need to understand that you are not alone, that Europe is trying to help you. On the contrary, anyone who attacks the EU is shooting himself in the foot,” he told Sunday's edition of La Repubblica newspaper.
Leading the charge has been Salvini, who heads the far-right League party and Luigi Di Maio, leader of the anti-establishment Five Star.
“The Commission has clearly said 'no' to threats, that they are unacceptable. All governments are required to respect their obligations regarding membership in the EU,” Avramopoulos said.
And he stressed the need for a clear policy on how to handle any future incidents involving migrants rescued at sea.
“We cannot move ahead with ad hoc solutions for each boat. The migration phenomenon is not going to stop overnight so we need to manage it together as one European family,” he said.
'Once we were Eritreans'
On Saturday, Albania's Foreign Minister Ditmir Bushati sent a message to his Italian counterpart Enzo Moavero Milanesi which was published on Twitter, saying Tirana was “ready to help”.
“We cannot replace Europe but we are always here, on the other side of a sea where once we were the Eritreans suffering for days and nights in the middle of the sea, waiting for Europe to wake up,” Bushati wrote.
After the fall of communism in early 1990s, Italy accepted thousands of people who fled Albania by sea, with Tirana keen to return the favour.
“Yesterday, Italy saved us, today we are ready to give a hand,” the minister said.
'Race to the bottom'
Migration is a hot-button issue in Italy, where hundreds of thousands of people have arrived since 2013, fleeing war, persecution and poverty in the Middle East, Africa and Asia.
Under EU rules people must seek asylum in their country of arrival, but Rome has recently moved to block boats from docking at its ports.
Speaking on Friday, UN High Commissioner for Refugees Filippo Grandi said Europe had “a fundamental moral and legal obligation” to help those fleeing war and persecution.
“The time has come to end the back-and-forth that has seen countries competing in a race to the bottom on who can take the least responsibility for people rescued at sea,” he said.
“It is dangerous and immoral to put the lives of refugees and asylum-seekers at risk while states engage in a political tug-of-war on long-term solutions.”