Last Thursday the 13 crew members of the boat, named Nuestra Madre Loreto, rescued migrants from Niger, Somalia, Sudan, Senegal and Egypt from a rubber dinghy off the coast of Libya.
Madrid initially asked Libya to take charge of the migrants since it was the nearest country to the boat, as called for by international law, before turning to its EU partners, the Spanish government said in a statement.
“The Spanish government is lobbying the governments of Italy and Malta, whose coasts are closest to the boat, to try to find a quick, alternative and satisfactory solution” to receive them, said Spain's Deputy Prime Minister Carmen Calvo.
Due to worsening sea conditions, the fishing vessel on Tuesday moved away from the coast of Libya and headed towards the Italian island of Lampedusa, the statement added.
READ ALSO: Immigration to Italy: a look at the numbers
The boat's captain, Pascual Dura, told AFP on Tuesday that Italy and Malta had both refused to allow the vessel to dock and unload the migrants while Spain's maritime rescue service only offered to return the migrants to Libya.
Dura said the migrants “get very nervous and hysterical” when they “hear the word Libya”.
“If we go to Libya, we run the risk of a mutiny,” he added.
Abuse of migrants is widespread in Libya, following the chaos which has reigned since the 2011 ousting of dictator Moamer Kadhafi.
Many migrants, intercepted or rescued at sea, find themselves held in detention centres in the country in dire conditions.
When Italian interior minister Matteo Salvini closed the country's ports to migrants in June, Spain welcomed the Aquarius charity-run rescue ship and its 630 migrants.
The Spanish request to take in the migrants comes as Salvini's new anti-migrant security decree was formally made law today.
Spain also welcomed the Open Arms ship three times but in September Madrid declined to receive the Aquarius again. Instead it negotiated the distribution of the migrants aboard the ship among several other European Union nations.
Earlier this year, the UN refugee agency UNHCR said that although the numbers attempting the crossing from north Africa to Europe had fallen sharply, the danger of dying during the crossing had sharply increased.