Migrants rescued from the Mediterranean and turned away by Italy and Malta have arrived in Spain's port of Valencia.
Three vessels, including the Aquarius, which rescued the 630 migrants last weekend, have now docked in the harbour.Follow @Graphicgh
Health officials, interpreters and Red Cross workers are on hand to offer support.
Spain's new socialist government has promised free healthcare and says 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, entered the port of Valencia at 06:20 (04:20 GMT). It was carrying 274 migrants, the Italian news agency Ansa reported.
On Valencia's quayside, 1,000 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 09:30 carrying another 106 migrants. They were seen celebrating as the ship arrived.
Another Italian ship, the Orione, docked later with 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. Reports say the largest groups (about 150 each) are from Sudan and Nigeria, with dozens more from Eritrea, South Sudan and Algeria.
Most of the rest of the 630 are from other African countries but a handful are from Afghanistan, Pakistan and Bangladesh.
Officials say the rescued migrants include 123 unaccompanied minors, 11 younger children under the age of 13 and seven pregnant women.
What will happen to them now?
Initially, the migrants will receive food and hygiene kits and everything else necessary to make them comfortable after weeks of hardship, Red Cross official Pedro Redon told the BBC.
The pregnant women will be taken for check-ups. Everyone on board will receive psychological help and the Spanish government has promised them medical assistance.
Police will have to identify them and take them to police stations to initiate immigration procedures.
French President Emmanuel Macron's government will work with Spain to deal with the migrants.
Spanish Deputy Prime Minister Carmen Calvo said that any migrants who wish to go to France would be allowed to do, providing they had a legitimate claim to asylum.
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 says it is 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.