The Spanish government announced on Sunday that hundreds of stranded migrants off the coast of Italy were welcome to disembark in the port city of Algeciras in the south of Spain.
The Open Arms, a charity rescue vessel, picked up the migrants off the coast of Libya.
The migrants, most of whom are African, had been waiting off the southern Italian island of Lampedusa, hoping to disembark there.
"I have given instructions to prepare the port of Algeciras to welcome Open Arms. Spain always acts in the face of humanitarian emergencies," Spanish Prime Minister Pedro Sanchez tweeted.
His office confirmed that the prime minister "today ordered the port of Algeciras to be ready to receive the boat Open Arms."
Emergency on board
However, Spain's offer has so far been declined by the ship.
"We do not accept Spain as a port to go because we are in a state of extreme humanitarian emergency. What they need is to be disembarked now," an Open Arms' spokeswoman said.
The boat has spent two-and-a-half weeks in limbo waiting for a port to dock.
The spokeswoman added that it was "unthinkable to navigate for six days; that is what it would take for us to arrive to Algeciras." The Spanish city is close to Gibraltar.
Act of desperation
The founder of the charity vessel, Oscar Camps, tweeted a video of four migrants jumping off the ship in orange life vests in an attempt to swim to Lampedusa.
Several crew members of the ship swam after them and brought them back into the vessel.
"We have been warning for days; desperation has its limits," said Camps.
Read more: Migrants force entry in Spain's Melilla exclave
'Inconceivable decision' by Italy
Italy's far-right Interior Minister Matteo Salvini had ordered his officials not to let the migrants dock.
He did make a partial concession on Saturday by allowing 27 minors to leave the vessel but refused to take the rest.
The Spanish government spoke of what it called Italy's "inconceivable decision" to close all its ports to migrants.
Sanchez said that "it is necessary to establish a European, orderly and caring solution, tackling the migration challenge with the values of progress and humanism."
Earlier this week, France, Germany, Luxembourg, Portugal and Romania also offered to take in some of the migrants following their disembarkation.
The French Interior Ministry confirmed on Sunday that France was prepared to take in 40 of the Open Arms migrants if they met the criteria to be treated as refugees.
mvb/tj (AFP, dpa, Reuters)
Every evening, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.