Updated Sunday 10pm
A potential stand-off involving 65 migrants - 39 of them children - rescued by the NGO rescue ship Alan Kurdi was averted on Sunday afternoon when Malta agreed with the European Commission and Germany to take the migrants and transfer them to other EU countries.
Half of a group of 58 migrants rescued separately by a Maltese patrol boat in Malta's search and rescue zone on Sunday will also be moved to other countries.
The agreements were announced by Prime Minister Joseph Muscat and government statements.
The deal involving the Alan Kurdi, was welcomed by German NGO Sea Eye, which operates the ship, although it regretted that its vessel would not be allowed into harbour.
The ship arrived off Malta on Sunday afternoon after having been refused permission to enter Italian waters off Lampedusa.
Following discussions with @EU_Commission and #Germany gov, #Malta gov will transfer 65 rescued immigrants on board #AlanKurdi to @Armed_Forces_MT asset which will then enter a Maltese port. All rescued persons on board will be immediately relocated to other #EU Member States.— Joseph Muscat (@JosephMuscat_JM) July 7, 2019
Prime Minister Joseph Muscat handled the talks and later said on twitter that none of the migrants will stay in Malta.
The migrants were transferred to a Maltese patrol boat at the edge of Maltese territorial waters and were expected to land on Malta at about 9.30pm.
"Even if the relief on board is great, the EU and all Member States must finally find a lasting agreement. Humanitarian aid from civil society must have access to European ports and must not become the pawn of politics. We save lives in the Mediterranean and are always dragged into political games," Sea Eye said in a statement.
"If the Heads of States and Governments want to discuss, they should do so, but not on the backs of people fleeing and not at the expense of civil organisations. Once again we were not allowed to enter the port of Valletta, despite the German flag, despite our humanitarian mission. This is not a durable situation," said Sea-Eye spokeswoman Carlotta Weibl.
Sea Eye said Germany had agreed to take 10 to 15 of the rescued people. It was not known which other countries had agreed to receive the migrants.
Ms Weibl had earlier pleaded for a solution to the plight of the migrants.
She said the situation on board was tense and some migrants were sitting in the extreme sun since there was not enough shelter.
Thirty-nine of the migrants are children.
"We have a ship full of children without the proper protection they have a right for," she said.
Three migrants needed to be evacuated from the ship immediately because of medical problems. They were brought to Malta.
The Alan Kurdi captain decided to head for Malta hours after another vessel which defied Italy and entered port at Lampedusa - the Alex operated by the Italian NGO Mediterranea - was impounded by the Italian authorities.
Another vessel, Sea Watch III, which similarly defied Italian orders a few days previously suffered the same fate. The masters of both ships face court proceedings.
It had been allowed to enter harbour when agreement was reached for the migrants it carried to be distributed among several EU countries. The same pattern was repeated in April.
A Rome-Valletta deal?
On Friday, the Maltese government had said that it would take in people aboard the Alex, provided Italy took an equal number of asylum seekers currently in Malta.
Italian news outlet La Repubblica reported that as part of that deal, Rome also wanted Maltese authorities to arrest the crew of the Alex as soon as they docked in Malta.
A Maltese government spokesman told Times of Malta that the only agreement struck between Malta and Italy was that announced in Friday's press release.
Malta's offer was however declined by the ship's captain, who said sailing to Malta would be too arduous given conditions aboard the Alex.
"In these conditions it is impossible to face 15 hours of sailing [to Malta]. We are waiting for Italian or Maltese naval arrangements to take these people on board," Mediterranea's Alessandra Sciurba said on Twitter.
She said that while Italy had taken families and pregnant women from the small vessel, "all non-accompanied minors remain on board, including an 11-year-old."
On Sunday the Maltese and Italian foreign ministers issued a joint statement again calling for a permanent EU mechanism to deal with migration. Thy also confirmed their 'firm will' to cooperate with each other.
Italian Interior Minister Matteo Salvini, whose hard line against NGO ships has caused his support to soar, on Saturday repeated his call for reform of the European Union's Dublin rules, which stipulate that asylum requests be handled by the country where they first arrive.
"It doesn't seem that the majority of European countries want to do it," said Salvini, vowing to change rules he says place an unfair burden on Italy.
"We want to overcome rules that don't work," he told journalists in Milan.
Despite Salvini's apparent firmness about closing Italian ports to migrants, dozens of migrants and asylum-seekers continue to arrive in Italy by other means, some rescued by Italian authorities.
Interior ministry figures showed 191 had arrived by sea over the last week.
A makeshift vessel carrying 86 people across the Mediterranean from Libya sank off the Tunisian coast on Wednesday, with all but three of them missing or dead.
Libya, which has been wracked by chaos since the 2011 uprising that killed veteran dictator Muammar Gaddafi, has long been a major transit route for migrants, especially from sub-Saharan Africa, desperate to reach Europe.
On Tuesday night, 53 migrants were killed in an air strike on their detention centre in a Tripoli suburb.