Germany has agreed to take in about a dozen of the 41 migrants who arrived in Italy last month on board German charity rescue ship Sea-Watch, an Italian government source said on Tuesday.
The compromise to diffuse tensions with the Italian government, which had ordered the ship not to enter Italian waters, also includes France, Portugal, Finland, and Luxemburg, which have agreed to share the burden of hosting the migrants.
There was no immediate official reaction from Germany or Italy about the accord which was first reported by Spiegel magazine.
The German captain of the ship, Carola Rackete, appeared before a court in Sicily on Monday after she was arrested for forcing her way into Lampedusa port on June 29 carrying migrants she had rescued off the Libyan coast.
A hearing in the city of Agrigento was meant to decide whether Rackete, should remain under house arrest or be freed as the investigation continues into her contested rescue mission. A decision is still pending.
An online campaign to help her launched by two German TV stars has so far raised almost 1 million euros ($1.13 million). A separate fundraiser launched on Facebook by an Italian group has raised 435,000 euros in seven days.
Sea-Watch spokesman Ruben Neugebauer told a news conference in Berlin on Tuesday that the money would be used to fund future rescue missions.
"This solidarity shows two things: that civil society is behind us and wants to defend us against the politics of letting people drown," said Neugebauer.
"And second, we now have the (financial) support needed to do more, to definitely continue rescuing people on the Mediterranean... if our boat remains confiscated we will go out on a new boat."
Rackete, a volunteer for Sea-Watch, has become a symbol of divisions in Italy over the government's policy of closing ports to non-government (NGO) rescue ships.
Deputy Prime Minister Matteo Salvini has called her a pirate, an outlaw and a people-smuggler. Left-wing politicians have hailed her as an anti-populist, humanitarian heroine.
The German government has called on Italy to release her. Italy says her fate is in the hands of the courts.
Rackete is accused of endangering the lives of four policemen aboard a patrol boat that was squeezed against the quay as the Dutch-flagged Sea-Watch 3 vessel forced its way into Lampedusa port.
She is also accused of resisting a warship order, which carries a maximum penalty of 10 years in jail, and of aiding people smugglers under recent laws introduced to deter NGO rescue ships.
Rackete's boat was impounded and Sea-Watch could be fined up to 50,000 euros.