A Spanish charity operating a migrant rescue ship stranded off the coast of Italy has rejected an offer from Spain to dock in Algeciras, citing the urgency of the emergency situation faced by the more than 100 people on board.

The migrants, most of whom are African, were picked up by the Open Arms boat off the coast of Libya in the past two weeks and have been waiting to disembark on the southern Italian island of Lampedusa.

Spain had agreed on Sunday to take in passengers on the vessel after Italy denied them entry.

Spanish Prime Minister Pedro Sanchez "today ordered the port of Algeciras to be ready to receive the boat Open Arms," which is currently in limbo off Lampedusa, his office said in a statement.

It cited the "urgent situation" on the vessel and the "inconceivable decision by the Italian authorities ... to close all its ports" to the migrants.

However, Open Arms said on Sunday that it could not go to Spain, arguing that it would be a long trip that would put the wellbeing of the migrants at risk.

"We are in a state of extreme humanitarian emergency. What they need is to be disembarked now," an Open Arms spokeswoman said. "It is unthinkable to navigate for six days; that is what it would take for us to arrive at Algeciras."

The director and founder of the Open Arms non-governmental organisation, Oscar Camps, said on Twitter that the situation on board was unsustainable.

Italy's far-right Interior Minister Matteo Salvini, who is also deputy prime minister, has refused to allow migrant rescue vessels to dock as part of his hardline policies, but yesterday allowed 27 children to leave the vessel.

Salvini, who leads the anti-immigrant League party, has taken a firm line against rescued migrants coming to Italy, which he says bears an unfair burden as the first port of call.

The Open Arms standoff with Italian authorities was the latest between Rome and charity vessels rescuing migrants - mainly sub-Saharan Africans - making the perilous journey across the Mediterranean.

On Sunday Salvini renewed his attacks on Open Arms, accusing it of lying about the condition of the migrants. He said a medical inspection on the boat by Italian authorities on Saturday had shown there was no sanitary emergency on board.

"They tell us to let the sick off the boat, and they turn out not to be sick; they say let the minors off, and a lot of them turn out not to be minors; we check the medical emergency, and there is no emergency," he said.

France said on Sunday it would take 40 of the migrants on board the Open Arms as long as they met the criteria to be treated as refugees.

"France commits to meet its promise to take 40 of the people," the interior ministry said.

EU splits

EU states disagree on how to handle the migrants crossing the Mediterranean and some like Italy are taking a tougher position, turning away rescue ships as they seek to dock to drop off rescued people.

Spain's foreign ministry on Sunday called again on Italian authorities to allow the migrants entry, guaranteeing that other EU states would take them in once they reached land.

"The Italian government can be assured that when they disembark, the 107 migrants will be shared" among countries willing to take them -- France, Germany, Luxembourg, Portugal, Romania and Spain, it said.

Italy's government on Saturday reluctantly agreed to let 27 children from the Open Arms disembark, but it required that the rest stay aboard.

The Open Arms has been anchored since Thursday within swimming distance of Lampedusa, and crew say the situation on board is critical after two weeks at sea.

Open Arms founder Oscar Camps on Sunday published a video showing four migrants jumping off the ship in a desperate bid to swim ashore before they were stopped and brought back.

The UN migrant agency (IOM) says at least 840 people have gone missing so far this year trying to cross from Libya to Europe.

Only a few civilian rescue vessels such as the Open Arms and the Ocean Viking are still operating in the Mediterranean as they say they face increasingly hostile reactions at European ports.