An Italian prosecutor ordered on Tuesday the seizure of the Open Arms migrant ship and the removal of the migrants on board, ending a prolonged stand-off between the Spanish charity and the government in Rome.

The migrants are expected to be removed from the boat during the night, but details were yet to be formalized, the prosecutor’s office said.

The Open Arms ship, run by a Spanish charity of the same name, has been stranded at sea for the past 19 days, with the charity saying that the migrants are distressed and urgently need to find shelter.

Open Arms’ director and founder, Oscar Camps, confirmed the boat would dock in Lampedusa, Italy’s southernmost island, between Sicily and Tunisia. 

“After 19 days, we will disembark today in Lampedusa. The ship will be seized temporarily, but it is a cost that Open Arms assumes to ensure that people on board can be served,” he said on Twitter.

“We consider it essential to prioritize the migrants’ health and safety in this humanitarian emergency,” he added.

One of 15 migrants who jumped off the ship is carried away on a stretcher. (Guglielmo Mangiapane/Reuters)

Spain sent a naval vessel earlier on Tuesday to rescue the migrants and take them to Mallorca after some of them jumped overboard.

But the Spanish navy will only reach Lampedusa in three days and the Open Arms repeatedly said that the situation on board was desperate and some migrants were suicidal.

The passengers were sleeping jammed together on deck and sharing two toilets.

After the charity said nine had tried to swim ashore, Reuters footage showed another five people jump, although it was not immediately clear if some were lifeguards.

Italian coastguards went to the rescue of those who jumped, Reuters reporters saw. Reuters footage showed a few people being brought to the Open Arms on a small dinghy but it was not clear if they were among the rescued migrants.

Italy has taken a tough line on migrant entry, saying it has borne too much responsibility for handling African migration to Europe. Interior Minister Matteo Salvini says the charity-run ships have become “taxis” for people smugglers.

We are no longer the refugee camp of Europe.– Italian Interior Minister Matteo Salvini

Dozens of migrants have been taken ashore since the ship entered Italian waters because they were said to be minors or ill.

Salvini suggested on Tuesday that the charity was exaggerating the problems on board. Of eight migrants taken ashore on Monday night for urgent medical attention, he said, only two had health problems.

“Spanish NGO, Spanish ship, Spanish port: The coherence and strength of Italy has paid off. We are no longer the refugee camp of Europe,” he said in a statement.

A crew member of Spanish military ship Audaz removes the rope before it departs from the Rota naval base for Lampedusa. (Jon Nazca/Reuters)

The standoff has fueled Salvini’s campaign against migrant boats from Africa, and comes as he is trying to force Italy into snap elections. Italy’s Prime Minister Giuseppe Conte announced his resignation on Tuesday, accusing Salvini of sinking the ruling coalition for personal and political gain.

While welcoming Spain’s latest move, Salvini’s political rival Danilo Toninelli said he hoped that Madrid would now commit to stop Open Arms’s activity in the future, meeting Italy’s wishes.

Toninelli, who controls the Coast Guard but not port access, had earlier offered to take the migrants on a Coast Guard vessel to Spain under the condition that Madrid de-register the Open Arms ship by removing its Spanish flag.

“I hope that Spain answers our appeal and commits to stopping Open Arms in the future with the means and in the ways it deems right,” the Italian minister said in a statement.

Without a flag, it would be difficult for the ship to continue running rescue missions.

Spain and five other European Union nations have offered to take the migrants. The details of the offers from Spain, France, Germany, Romania, Portugal and Luxembourg have yet to be finalized.