The migrant rescue ship Aquarius, which was left stranded in the Mediterranean Sea after Italy and Malta closed their ports to it, is heading off on a three-day journey to Spain — with help from the same countries that turned it away.

After the ship rescued migrants off the coast of Libya over the weekend, Italy said it wanted the rest of Europe to take the passengers; Malta said this ship was clearly Italy's responsibility.

So Spain announced Monday that it would open the port of Valencia to the ship and the 629 migrants it carried. But aid workers aboard the Aquarius warned that the ship did not have enough provisions to make the more than 800-mile journey.

On late Monday, Doctors Without Borders said on Twitter it "welcomes this gesture of humanity but it would require four more days at sea in a boat already over maximum capacity and in deteriorating weather conditions." The group also noted the migrants aboard the ship had already been at sea for more than three days.

"This plan would mean already exhausted rescued people would endure 4 more days travel at sea," the group, also known as MSF, said a few hours later. "The better option would be to disembark the rescued people in the nearest port after which they can be transferred to Spain or other safe countries for further care & legal processing."

The aid group SOS Mediterranée, which operates the Aquarius in partnership with MSF, noted another problem with the plan: It means the Aquarius will be tied up with traveling and unable to save more lives.

"People are still fleeing Libya while the Aquarius is away from the search and rescue area in the Central Mediterranean, where rescue capacities are already totally insufficient," SOS Mediterranée vice president Sophie Beau said in a statement.

Migrants attempting to cross to Europe frequently drown in the Mediterranean, often as a result of being packed into overcrowded dinghys or boats that are liable to sink.

Rescue ships like the Aquarius pick migrants up from those unsafe boats. Dr. Craig Spencer, Director of Global Health in Emergency Medicine at New York-Presbyterian who has led the medical team aboard the Aquarius, spoke to NPR in 2017 about the work the ship does.

"It's clear right now, too many people will drown if we're not out here," he said.

Thousands of migrants died crossing the Mediterranean last year, and more than 5,000 in 2016. It's difficult to know the precise number, because some boats presumably sink unnoticed, as NPR reported in January.

Meanwhile, local leaders on the French island of Corsica suggested opening one of their ports to the ship, but the central government in France did not support the proposal, The Local reported. Corsica is not the closest port to the ship, but is closer than Valencia.

And Italian and Maltese authorities stood firm, providing resources to help with the trip to Spain rather than offering to reopen a closer port.

On Monday, the Maltese Navy delivered water, noodles and snacks, while on Tuesday the Italian Navy brought more food as well as blankets, hats and socks, the aid group SOS Mediterranee said.

And two Italian vessels are helping with the trip to Valencia — taking hundreds of the rescued migrants aboard to relieve overcrowding on the Aquarius.

"Bizarrely, 400 of these people were transferred to Aquarius from Italian navy and coast guard ships" during their initial rescue, MSF wrote.

Lucia Benavides, reporting for NPR from Barcelona, explains that Spain is experiencing an increase in migrants arriving by sea.

With this stranded ship, Spain's new prime minister said it was his country's duty to avoid a humanitarian crisis, she reports:

"Spain's decision was welcomed by Italy, whose coalition government includes a right-wing, anti-immigrant party. One of their leading politicians declared this a turning point in Europe's migration crisis, with other countries more willing to take in refugees who cross the Mediterranean. "Italy has seen hundreds of thousands of migrants reach its shores since 2014, and many Italians say they've been left alone to deal with the crisis. At a rally on June 3rd, Italy's new interior minister Matteo Salvini listed the reasons people elected him. 'And most of all, for defending our borders,' he [said] to large applause. "This year, migrant arrivals in Italy have dropped — down 77 percent, according to the UN Migration Agency. "Immigration lawyer Violeta Moreno-Lax says that's partly due to two things: a controversial deal made with Libya in 2016 to intercept migrants leaving its shores, and investigations into NGO search-and-rescues that accuse them of 'aiding illegal immigration' – sometimes detaining their boats."

As a result, a growing number of migrants are crossing the Black Sea, she reports, or taking the Western Mediterranean route — from Morocco and Algeria, bound for Spain.

Copyright 2018 NPR. To see more, visit http://www.npr.org/.