Migrants rescued from the Mediterranean and turned away by Italy and Malta have arrived in Spain's port of Valencia.
The first of three vessels entered harbour soon after dawn. The Aquarius, which rescued the 629 migrants last weekend, arrived several hours later carrying a second group.
Health officials and interpreters are on hand to offer support.
Spain's new socialist government has promised free healthcare and said it will investigate each asylum case.
"It is our duty to help avoid a humanitarian catastrophe and offer a safe port to these people, to comply with our human rights obligations," Prime Minister Pedro Sánchez said earlier this week.
He has adopted a migrant-friendly stance since taking up his post two weeks ago.
How are the migrants being received?
An Italian coast guard ship, the Dattilo, was the first to enter the port of Valencia soon after dawn. It was carrying 274 migrants, the Italian news agency Ansa reported.
On Valencia's quayside, 1000 Red Cross workers were on hand to greet the migrants as they stepped off the ship. Police officers have also been drafted in to handle their arrival.
The Aquarius itself entered the port shortly after 9:30am.
A second Italian ship, the Orione, is expected to dock soon, carrying the rest of the migrants.
Who are the migrants?
The migrants spent 20 hours in overcrowded rubber dinghies before being rescued by the Aquarius. They have since spent a week in rough seas - with many suffering seasickness.
"The weather was very bad unfortunately, and the sea was rough," Sophie Beau of aid organisation SOS Méditerranée told the BBC.
"So people are in a bad state ... and they are really relieved to come on safe land at the moment."
They come from 26 countries. Most of the 629 are from Africa but others are from Afghanistan, Pakistan and Bangladesh, the medical charity Médecins Sans Frontières says.
Officials said the rescued migrants included 123 unaccompanied minors, 11 younger children under the age of 13 and seven pregnant women.
Why the fuss about the Aquarius?
The Aquarius sparked a major diplomatic row when it was left stranded on Monday.
Italy's populist coalition - and in particular its interior minister, the right-wing League party leader Matteo Salvini - has taken a hard-line approach to immigration and refused to let it dock.
Mr Salvini said it was unfair that countries on the frontline of the EU have had to carry most of the burden of handling the migrant influx.
He said Malta should accept the Aquarius, but it refused, arguing that it fell under Italian jurisdiction.
Valencia's Mayor Joan Ribo, who has offered the ship a safe berth, described Italy's decision to turn the vessel away as inhuman.
He told the BBC that he hoped the city's actions would act as an "electric shock" and lead to reform of Europe's migration policies.
Earlier, Mr Macron accused Italy of "irresponsibility" for turning the Aquarius away.
Migration reform is likely to be a key topic at a meeting of EU leaders later this month, as many countries continue to grapple with the political fallout caused by an influx of migrants in recent years.