Four EU countries have agreed to take in 64 African migrants who were rescued after being stranded in the Mediterranean Sea for almost two weeks.
The Alan Kurdi ship, operated by the German humanitarian group Sea-Eye, had been refused entry by Italy and Malta.
Both countries had said it was Libya's responsibility, Sea-Eye had claimed.
But on Saturday the Maltese government announced that the migrants will be redistributed among Germany, France, Portugal and Luxembourg.
"None of the migrants will remain in Malta. The ship Alan Kurdi will not be allowed to enter Malta," the government said in a statement.
The agreement had come through the co-ordination of the European Commission, it added.
Two migrants had already been evacuated to Malta after falling ill on the German ship, named after the three-year old boy who drowned as his family fled the conflict in Syria.
"Once again the smallest member of the European Union was put under unnecessary pressure, being asked to resolve a case which was neither its responsibility nor its remit," the Maltese government said.
"A solution was found in order not to let the situation deteriorate further while making it clear Malta cannot keep shouldering this burden."
Three teenage migrants were charged in Malta last month after "hijacking" an oil tanker that had rescued them.