Italian premier Giuseppe Conte has said his country will take some of the migrants on board a rescue ship which has been stranded near Malta for days.
Mr Conte said he made the pledge in a call to the prime minister of Malta, Joseph Muscat, adding that he hoped that other EU countries would follow his example.
The ship, run by the German group Mission Lifeline, has more than 200 migrants on board.
It has been stranded in international waters some 25 miles from the coast of Malta for days after both Italy and Malta refused to allow it to dock.
Both countries underlined that the ship had acted improperly by not following the orders of the Italian command centre directing rescues at sea.
The impasse follows a similar stand-off over another private rescue boat, the Aquarius.
Earlier, Spanish prime minister Pedro Sanchez said his country is prepared to be part of a European response to the plight of the German-operated migrant aid ship - but did not specify whether it will allow the vessel to dock.
Earlier this month, Spain took in 630 migrants from the Aquarius after Malta and Italy refused it access.
Mr Sanchez was asked during a visit to Berlin whether Spain would offer safe harbour.
He replied that Spain would be part of the "common answer", but added that the solution "has to be European, it has to be from various countries".
The leader of Malta said the island nation is working to resolve the case.
Mr Muscat said his country aims "to prevent escalation into humanitarian crisis" by sharing the responsibility with other fellow EU nations.
Meanwhile, Austria has conducted a high-profile training exercise to show how it could deal with an influx of migrants along its frontier with Slovenia, amid fears of a domino effect if Germany closes its borders.
Hundreds of police and soldiers staged a dry run Tuesday near Spielfeld, 110 miles south of Vienna.
The town was a major crossing point for migrants in the summer and autumn of 2015.
Thousands of migrants poured through Europe's open borders daily three years ago, triggering a humanitarian and political crisis that has left deep divisions on the continent.
German chancellor Angela Merkel is under pressure from conservative allies in Bavaria to turn migrants back at the border, a move that could prompt others to do the same.
Hardly any migrants have been arriving in Spielfeld recently.