French President Emmanuel Macron has accused the Italian government of "cynicism and irresponsibility" for refusing to let a stranded rescue ship packed with migrants dock in Italy.
A charity looking after the 629 migrants on the Aquarius, stranded off Malta, says two Italian ships will help take them to Spain's port of Valencia.
But Spain is at least three days' sailing away. Mr Macron said Italy was "playing politics" with the migrants.
They were picked up off Libya's coast.
The migrants, mainly sub-Saharan Africans, were found in inflatable boats at the weekend. They are now being looked after by Doctors without Borders (MSF) and the Franco-German charity SOS Méditerranée aboard the Aquarius.
Mr Macron's spokesman Benjamin Griveaux said the French president recalled that "in cases of distress, those with the nearest coastline have a responsibility to respond".
"There is a degree of cynicism and irresponsibility in the Italian government's behaviour," he quoted President Macron as saying.
Most migrants who survive the perilous voyages from North Africa end up in overcrowded Italian camps, and Italy says its EU partners must ease the burden.
The plan is for the Aquarius to be joined by an Italian coastguard ship and a warship, which will take on board most of the migrants.