The head of the French charity which charters the Aquarius migrant rescue ship said Tuesday that it would continue its operations despite the worldwide standoff over the 629 people now onboard.
Macron and Muscat would be working together in the run up to the next European Council and beyond, the statement said.
"This plan would mean already exhausted rescued people would endure 4 more days travel at sea", Doctors Without Borders (MSF) said on Twitter.
Italy's Prime Minister Giuseppe Conte said his country had "asked for a gesture of solidarity from Europe and this gesture has been made".
"The Italian government has never abandoned the nearly 700 people aboard the Aquarius", the statement in reply insists.
He added: "It will be necessary to sit down and discuss how to prevent this kind of thing from happening in the future".
A little more than a week ago, Italy's new interior minister, Matteo Salvini, told a crowd that "Italy and Sicily can not be Europe's refugee camp" and "the good times for illegals are over", Deutsche Welle reports.
Both the Mayor of Barcelona and the Mayor of Valencia offered their cities to take in the ship, with the latter being the end destination for the Aquarius' 1,300 km route.
"Victory!" He wrote on Twitter after the announcement. Conte said he would discuss the situation further with Salvini and other ministers on Monday evening.
However, journalists aboard the Aquarius are now reporting that the organisers of the rescue mission, from the NGOs SOS Méditerranée and Medecins Sans Frontieres, have decided travelling to Valencia would be too risky. After urging a quick resolution of the impasse earlier in the day, the United Nations refugee agency, through spokesman Charlie Yaxley, said Sanchez's offer "is a welcome development and a great display of solidarity from Spain with refugees". He noted that other European countries are very much involved in current rescue operations in the Mediterranean including a German aid group now off Libya but no country is stepping up to actually take in the migrants.
Mr Salvini says he wants to "stop the death boats".
The emergency was prompting vastly different reactions in European capitals.
"We are talking about people", commission spokesman Margaritis Schinas told a news conference.
More than 600 people are stuck aboard the ship Aquarius, run by a French charity, which is now waiting between Malta and Italy while the two countries row over who should take responsibility.
The decision by the new socialist Spanish government provides a stark contrast to that of its Italian counterpart, which on Sunday took the drastic step of refusing entry to the ship. Salvini pointed to Malta's unwillingness in accusing Europe as a whole of leaving Italy on its own to deal with the refugee crisis. "I've had enough." The Sea Watch still did not have any migrants on board, spokesman Ruben Neugebauer said.