All 62 migrants on the Alan Kurdi ship will be disembarked and redistributed between Germany, France, Portugal and Luxembourg, Malta's prime minister Joseph Muscat announced on Twitter | Matthew Mirabelli/AFP via Getty Images Malta to allow German NGO ship to dock, ending standoff Valletta said all 65 people on board the ‘Alan Kurdi’ would be allowed on land.

The Maltese government announced Sunday it would allow a German NGO ship to dock on the island, after the vessel became a flashpoint in a tug-of-war between Italy and Germany over who is responsible for taking in migrants rescued at sea.

The 65 people on board the "Alan Kurdi," which is operated by the German NGO Sea-Eye, will be picked up by the military and relocated among several EU countries, Maltese Prime Minister Joseph Muscat tweeted Sunday evening following discussions with the European Commission and the German government.

"None of the said immigrants will remain in Malta as this case was not under the responsibility of the Maltese authorities," Muscat said. Three people, he added, were in need of urgent medical attention and would be evacuated "immediately."

The decision ends a tense stand-off between Italian and German authorities.

The Alan Kurdi, forbidden by an Italian decree from docking in Lampedusa, decided late Saturday to set sail for Malta. The Maltese government initially said the boat was not allowed to sail into Maltese waters, according to dpa.

"We can't wait for there to be an emergency situation on board," the German NGO tweeted by way of explanation on Saturday — referring to the "Alex," a ship belonging to Italian NGO Mediterranea, which defied Italy's ban on Saturday and docked in Lampedusa because of untenable sanitary conditions on board.

The two incidents sparked a war of words between Matteo Salvini, Italy's interior minister, and his German counterpart Horst Seehofer, who called on the Italian far-right leader to rethink his decision to close Italian ports to NGO rescue ships and said Berlin was ready to take in migrants "in the framework of a European solution," according to Die Welt.

Salvini responded, in a video posted online, that he would rather have the migrants sent by bus "directly to the German embassy in Rome."

The German government on Sunday offered to take in 15 to 20 people from the Alan Kurdi and from a Maltese military vessel that rescued 58 people in a separate operation, Seehofer said Sunday.

He also called for a "viable and functioning mechanism to deal with these cases quickly," calling on the European Commission and EU member countries to "work hard on this."

The news also comes several days after Italian authorities released German captain Carola Rackete, who was arrested last week for docking a ship carrying 40 migrants in the port of Lampedusa without permission.