Malta has allowed a ship carrying 141 migrants to dock in Valletta.
But those on board won’t be allowed to stay in Malta.
Instead, they will be flown to France, Germany, Luxembourg, Portugal and Spain.
The move ends an standoff over who should accept the rescue ship named Aquarius.
In a tweet, Prime Minister Joseph Muscat said: ‘Malta will be making a concession allowing the vessel to enter its ports, despite having no legal obligation to do so.
‘Malta will serve as a logistical base and all of the reportedly 141 migrants on board will be distributed between France, Germany, Luxembourg, Portugal and Spain.’
French President Emmanuel Macron also tweeted, thanking Malta ‘for its humanitarian gesture’ and saying France offers its ‘full solidarity’.
Germany’s interior ministry confirmed it would take in up to 50 migrants from the rescue ship.
On Monday, Italy’s transport minister Danilo Toninelli called on Britain to help Malta.
He said: ‘The United Kingdom should assume its responsibility to safeguard the castaways.
‘The boat is now in Malta’s waters and has a Gibraltar flag.
‘The United Kingdom has a responsibility here.’
Italy has repeatedly refused rescue ships entry to its ports.
The MV Aquarius had been ‘stuck’ at sea since Friday after it rescued migrants trying to cross the Mediterranean on wooden boats.
Those onboard the rescue ship come from Eritrea, Somalia, Cameroon, Ivory Coast, Bangladesh, Nigeria, Morocco and Ghana.