After six days, 134 migrants were allowed to disembark an Italian coastguard vessel docked in Sicily.
Italy's Deputy Prime Minister Matteo Salvini refused to let the migrants off the boat until he was assured other European nations would help by taking in some of the migrants.
Salvini, who is also the country's interior minister and leader of the far-right League, is now under investigation for his role in the detention.
The Ubaldo Diciotti vessel originally picked up 190 people on Aug. 15 from an overcrowded boat in the Mediterranean Sea near the Italian island of Lampedusa. Thirteen people were evacuated for emergency medical treatment. Most of the migrants are from Eritrea, the BBC reports.
When the boat docked at the Sicilian port of Catania last Monday, Salvini initially allowed 27 children travelling alone to leave the vessel and then 16 more people, who doctors identified as needing medical care. The remaining migrants were not allowed off until Salvini was assured they would "go elsewhere," according to the Guardian.
Following the announcement of the formal investigation into his role in the standoff, Salvini granted permission for the remaining migrants to leave the boat on Saturday.
The Italian church will reportedly take in the majority of the migrants, while Albania offered to take 20 migrants and Ireland said it would take 20-25 migrants.
The resolution came as the U. N. appealed to EU members to "urgently" offer relocation places for the migrants.
The U.N. High Commissioner for Refugees Filippo Grandi urged the European States to "do the right thing" and offer asylum for people "rescued from the Mediterranean Sea in their time of need."
"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," Grandi said in a statement.
"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," he said.
According to EU rules, people must seek asylum in the location they arrive, but Italy has started barring boats from docking.
The BBC's Danny Eberhardt told NPR that Salvini is being investigated for suspected illegal confinement and abuse of power but that Salvini shows no signs of backing away from his policy of blocking ports to migrants.
"I think it will be hard to stop us," Salvini said to a room full of his supporters on Saturday. "Because they can investigate me, they can arrest me. But they can't arrest the desire for change of 60 million Italians."
"The next ship can turn around and go back where it came from because our limit has been reached," Salvini said.
NPR's Maddalena Richards contributed to this report.