More than 600 men, women and children, mostly from Africa, had hopes for a better life rekindled Sunday when their rescue ships were allowed to dock in Spain.
The Aquarius, operated by Doctors Without Borders, pulled into the port of Valencia. The passengers were greeted by more than 2,300 Red Cross volunteers and other humanitarian workers, including police, doctors and translators.
A huge banner reading "Welcome Home" in several languages filled the arrivals with optimism and a feeling that they are wanted and welcome in Europe, a week after Italy and Malta turned them away.
About 100 of the migrants were on board the Aquarius. The others had been transferred to two Italian military ships to avoid overcrowding.
"The sad odyssey of the people on the Aquarius is another reminder that all people, regardless of their nationality or immigration status, should have access to basic assistance and protection," Elhadj As Sy, secretary general of the International Federation of the Red Cross and Red Crescent Societies, said.
"No human being is illegal," Sy added.
Initial medical examinations show no serious injuries or illnesses among the refugees. Most are adult men and women, including seven pregnancies. The others include children and teens.
Doctors Without Borders said the migrants come from 26 countries, mostly from sub-Saharan Africa, but also from Afghanistan, Bangladesh and Pakistan.
Spain will offer them humanitarian stays of 45 days while their requests for asylum in Spain or France are considered.
The Aquarius picked up the 630 migrants off the Libyan coast last week. But the new right-wing Italian government refused to let the ship dock. Malta also sent it away.
But Spain's new prime minister, Pedro Sanchez, announced the Aquarius and the two Italian military vessels would be welcome there, saying, "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."
Italian officials said their country has taken in enough migrants and have long complained other European Union members do not do enough.
WATCH: Europe migrants
Italian Prime Minister Giuseppe Conte has proposed the EU set up asylum processing centers in Africa to prevent what he calls "voyages of death" across the Mediterranean or migrants falling victims to criminal human traffickers.
Italy and Greece have been the most popular and closest destinations for those seeking to escape war, poverty and terrorism. But Spain is fast becoming another port of refuge because of the crackdown by Italy and crowded conditions on refugee camps in Greece.
European Union leaders meet later this month and migrant reform is expected to be the main topic.