By Colleen Barry and Aritz Parra

The Associated Press

MILAN — More than 80 people were being evacuated from a migrant rescue ship on Tuesday, capping a drama that saw 15 passengers jump into the sea to escape deteriorating conditions aboard and spurred Spain to dispatch a naval ship in a bid to end a weekslong humanitarian crisis with Italy.

Sicilian prosecutor Luigi Patronaggio ordered the seizure of the ship off Italy’s southernmost island of Lampedusa — and the immediate evacuation of its passengers — after he boarded the vessel and met with port authorities as part of an investigation into possible kidnapping charges resulting from the refusal of hard-line Interior Minister Matteo Salvini to allow the migrants to get off the Spanish humanitarian ship named the Open Arms, the news agency ANSA reported.

“Finally, the nightmare ends and 83 people on board will receive immediate assistance on land,” Open Arms said on Twitter. Hours later, migrants and crew celebrated as the rescue ship docked in Lampedusa.

The rescued passengers have been on the Spanish-flagged charity ship since they were plucked from the Mediterranean 19 days ago.

Even after six countries stepped forward to take the migrants and Italy’s governing coalition imploded partly because of the crisis, Salvini had refused to open Italian ports.

The minister staved off previous investigations resulting from other migrant standoffs.

Earlier Tuesday, Spain’s caretaker Socialist government sent a navy ship to escort the Open Arms back to a Spanish port after more than a dozen of the migrants jumped into the sea within view of Lampedusa, desperate to flee overcrowded conditions on the vessel following their rescue off Libya. Those who jumped overboard were quickly picked up by Italian ships.

Until the action by the Italian prosecutor, the Spanish move was the first concrete signal promising an end the humanitarian crisis involving the Open Arms.

The temporary confiscation of the rescue ship by the prosecutor “is a cost that Open Arms assumes to secure that the people on board can be assisted,” said the Spanish NGO’s founder, Oscar Camps, on Twitter.

Meanwhile, the Norwegian-flagged Ocean Viking, which is operated by two French humanitarian groups and has 356 rescued migrants aboard, has been sailing between Malta and the Italian island of Linosa as it waits for a port of safety to be assigned.