Move by new Spanish government comes after Italy and Malta refused to let humanitarian vessel dock at their ports.

Spain‘s new government has stepped up and offered to take in a rescue ship that is drifting in the Mediterranean sea with 629 refugees and migrants, including 123 unaccompanied minors, on board after Italy and Malta refused to let it dock.

Spain’s Prime Minister Pedro Sanchez, a socialist who took office just over a week ago, gave instructions for the humanitarian vessel to be admitted to the eastern port of Valencia, his office said in a statement on Monday.

The Aquarius took the people, including seven pregnant women, from inflatable boats off the coast of Libya at the weekend.

It sailed north towards Italy, but Matteo Salvini, head of the far-right League party who became interior minister this month vowing to curb an influx of migrants from Africa, blocked it and said it should go to Malta, a fellow European Union member, instead.

“Saving lives at sea is a duty, but transforming Italy into an enormous refugee camp is not,” Salvini wrote on Facebook on Monday.

Malta refused, saying it had nothing to do with the rescue mission, which was overseen by Italian coastguard.

Valencia is almost three days’ voyage for the Aquarius, while Italy and Malta are just hours away.

Aloys Vimad, from Doctors without Borders, one of the group’ co-operating the Aquarius, said there was enough food and water “to give to people for two to three days”.

Commenting about heading to Spain, Vimad, who is on board the ship, told Euronews: “This is not what we wish, it’s overcrowded … people are weak, tired, exhausted.”

Antoine Laurent, from SOS Mediterranee, which also co-operates the ship, echoed the same sentiment.

Speaking to Al Jazeera, he said the charity acknowledged Spain’s solidarity but stressed that heading there was not their decision.

“[Italy] is under command and they have to take that decision,” he said.

“It’s also technically not really easy for us to go to Spain, we will need at least two more days of sailing, which is not possible,” he added. “We urge Italy to find a solution very soon close to our position.”

But following Sanchez’s move, Salvini wrote on Twitter: “Victory!”

“To politely raise one’s voice pays off,” Salvini told a news conference in Milan. “It’s something Italy hasn’t done for many years.”

Earlier, the UN’s refugee agency called on politicians to find a solution.

“States and actors involved should rapidly find solutions to allow migrants and refugees on board to disembark safely and quickly,” it said in a tweet.

“Hundreds of people urgently need assistance, slowing down operations puts their well being at risk.”

Survivors from this critical rescue over the weekend are currently onboard #Aquarius. They urgently need a safe place to disembark. pic.twitter.com/OMqRBpUoLh — MSF Sea (@MSF_Sea) June 11, 2018

Al Jazeera’s Jonah Hull reporting from Rome said hopes were really low.

“[People] are hoping they will get some sort of solution from the Italian authorities but it rather sounds as if this is a government cementing a new policy, rather than preparing to change its mind.”

The Mediterranean has long been a key route into Europe for refugees and migrants are using North African states, such as Libya, Tunisia, and Egypt as launch points for journeys.

In the year 2017, 171,635 migrants and refugees made the sea crossing into Europe and 3,116 people died or went missing trying to do so.

Earlier in June, at least 112 people died in a shipwreck off the coast of Tunisia while trying to make the journey north across the Mediterranean.