Hundreds of migrants stranded for days on an aid ship in the Mediterranean because Italy and Malta refused to take them headed Tuesday for Spain after being transferred to two other vessels.

Rescuers warned of deteriorating weather conditions facing the 629 people including pregnant women and scores of children who have been crammed on the Aquarius vessel since being plucked from the sea off the Libyan coast at the weekend.

With food and drink running short, their plight could last another three or four more days before they are finally able to land in the Spanish port of Valencia, according to the French charity SOS Mediterranee which operates the ship.

“#Aquarius has set sail to #Valencia at 21h00 as have the #Dattilo and #Orione, all three ships carrying the 630 people rescued 72 hours ago,” SOS Mediterrannee tweeted late Tuesday, referring to two other official Italian vessels involved in the operation that will see them cover 1 500 kilometres.

Spain stepped in to help after Italy which has been on the front line of the migration crisis in Europe and Malta refused to allow the Aquarius to land despite strong pressure from the international community.

Italy’s stance has triggered a war of words with its European allies, with France in particular accusing it of being “irresponsible”.

Doctors from another French charity, MSF (Doctors without Borders), are helping treat the migrants, who include seven pregnant women, 11 young children and 123 unaccompanied minors.

Spain’s new Prime Minister Pedro Sanchez had offered the boat safe harbour, saying there was a moral “obligation to help to avoid a humanitarian catastrophe”.

Italian Interior Minister Matteo Salvini said he would go to Libya, the launchpad for many migrants and refugees fleeing war and poverty in Africa and the Middle East by the end of the month.

“This situation needs to be resolved on the African continent,” said Salvini, whose new populist government has vowed a tougher stance on immigration.

He wants to cut the number of arrivals to Italy something already achieved by his predecessor thanks to a deal struck with Libyan authorities while accelerating the expulsion of “illegals”.

Salvini has repeatedly accused charities of working with human traffickers but said Italy would not stop rescuing migrant boats itself.

“We have put a stop to the NGOs. The coastguard and navy can continue to save lives, but other countries need to keep giving us a hand.”

He noted that an Italian coastguard ship was expected to dock in Sicily in the coming hours carrying some 937 migrants, also rescued off Libya.

SOS Mediterranee insisted it would continue its rescue activities once the Aquarius had returned from Spain.