Rescue ship allowed to disembark in Sicily
Italy had refused to allow most of the migrants off until a solution was reached regarding their relocation.
Late on Saturday, Interior Minister Matteo Salvini revealed a number of bishops had agreed to take them in.
Mr Salvini is under investigation for his role in the stand-off.
Sicilian prosecutors opened an inquiry into possible illegal confinement, illegal arrest, and abuse of power.
The fate of the 140 migrants, most of whom are Eritrean, has prompted local protests throughout the week and attracted international attention.
The Diciotti arrived in the Sicilian port of Catania last Monday, but until Saturday only small groups had been allowed into Italy, including unaccompanied children and the sick, two of whom are said to have tuberculosis.
Mr Salvini refused the vessel permission to disembark until the EU agreed to distribute the migrants among other countries, saying he did not want the migrants to be a "burden" on Italian citizens.
Under EU rules, people must seek asylum where they arrive, but Italy has increasingly barred boats from docking.
Announcing the end of the stand-off, Mr Salvini said the bishops were "opening their doors, their hearts and their wallets" to the migrants.
Ireland and Albania have also reportedly agreed to take a number of the migrants in. ■