Migrants on board a German rescue ship refused entry into Italy will be taken to a Maltese port before being relocated to other European states, Malta’s prime minister said on Sunday, Trend reports citing Reuters.

The German-flagged Alan Kurdi, which has 65 migrants on board, decided on Saturday to change course for Malta after a standoff with the Italian government.

It is the latest of several vessels carrying migrants that have faced problems trying to dock in an Italian port in the past couple of weeks.

Italy’s migration policy has led to clashes between NGOs and Italian authorities over rules that effectively close off the country’s ports to their boats.

In a tweet on Sunday, Maltese Prime Minister Joseph Muscat said following talks with the European Commission and Germany the 65 migrants on the ship would be transferred to one of its boats and brought to a Maltese port.

“All rescued persons on board will be immediately relocated to other EU member states,” he said, adding that none of the migrants would remain in Malta.

German interior minister Horst Seehofer welcomed the development in a statement, saying 94 of 123 migrants from ships that were allowed to land in Malta would be shared among EU member states. “In the spirit of European solidarity, we will take up to 40 of them.”

Italy’s coalition government, which includes the right-wing League, has been blaming European partners for leaving it to deal with sea arrivals alone.

New rules were adopted last month threatening NGO ships entering Italian waters without permission with a fine of up to 50,000 euros and the impounding of their vessels.

On June 29, Italian police arrested the German captain of the Dutch-flagged Sea-Watch 3, operated by a German charity, after the vessel docked at the island port of Lampedusa though she was later released.