The 630 migrants whose rescue sparked a major migration row in Europe began disembarking in Spain on Sunday, after a turbulent week that saw Italy turn away the Aquarius ship.
The first of three ships transporting the group, an Italian coast guard vessel called the Datillo, pulled into Valencia harbour just before 6:30 am (0430 GMT) with 274 migrants on board, according to the Red Cross.
Applause could be heard coming from the ship as it docked.
Medical staff wearing white overalls, gloves and masks then boarded the boat to carry out first medical checks as a police helicopter flew overhead.
The other migrants will arrive on an Italian navy ship, the Orione, and the Aquarius itself by noon, regional authorities said.
The migrants, mainly from Africa, will be welcomed by a team of more than 2,000 people, including 1,000 Red Cross volunteers and 470 translators.
Dozens of reporters who were on hand to cover their arrival were kept at a distance and no top government officials were expected at the port.
High waves and winds forced the convoy to take a detour on their 1,500-kilometre (930-mile) voyage to Spain. Their arrival will mark the end of a week-long odyssey in the Mediterranean Sea.
A huge banner was earlier put up at the port saying “Welcome home” in various languages including Catalan, the local language, and Arabic.
“People are coming forward for everything: serving as translators, providing accommodation,” said Johnson Tamayo, a 51-year-old artist and Red Cross volunteer.
The passengers are made up of 450 adult men and 80 women — including at least seven pregnant women —- as well as 11 under-13s and 89 adolescents, according to figures released by authorities in Valencia.
They come from 26 countries, mainly from Africa but also Afghanistan, Bangladesh and Pakistan, according to Doctors Without Borders (MSF).
Chartered by a French aid group, Aquarius rescued the migrants off Libya's coast last weekend.
MSF, who along with French charity SOS Mediterranee were treating the migrants on board the ship, said two passengers drowned last weekend when the ship first encountered difficulties off Libya.
Italy's new populist government and Malta refused to let Aquarius dock in their ports, accusing each other of failing to meet their humanitarian and EU commitments.
Spain eventually stepped in and agreed to receive the refugees as a “political gesture” to “oblige Europe to forge a common policy to a common problem”, Foreign Minister Josep Borrell said.
Madrid on Saturday said it had accepted an offer from France — who had angered Rome by branding it irresponsible over the vessel rejection — to welcome Aquarius migrants who “meet the criteria for asylum”.
Two countries will “work together” to handle the arrival, Spain's deputy prime minister Carmen Calvo said.
Prime Minister Pedro Sanchez thanked French President Emmanuel Macron for his gesture, saying it was “exactly the kind of cooperation Europe needs” at this hour.
The plight of the Aquarius has again highlighted the failure of EU member states to work together to deal with the influx of migrant arrivals since 2015.
After Rome's decision to ban the Aquarius, Macron and Italian Prime Minister Giuseppe Conte met on Friday and agreed that the EU should set up asylum processing centres in Africa to prevent “voyages of death”.
They also demanded “profound” changes to the EU's asylum rules which put the migrant burden on their port of entry to Europe — mainly Italy and Greece.
Italy's far-right Interior Minister Matteo Salvini warned Saturday that other NGO operated rescue ships would also be banned from docking.
“While the Aquarius is sailing towards Spain, two other Dutch NGO operated vessels (Lifeline and Seefuchs) have arrived off the Libyan coast, to wait for their human cargos once the people smugglers abandon them,” Salvini said in a Facebook post.
“These people should know that Italy no longer wants to be any part of this business of clandestine immigration and they will have to look for other ports to go to,” he said.
“As minister and as a father, I take this action for the benefit of all,” he added.