France and Italy have agreed to launch sea and air patrols to stop African migrants from reaching Europe, ending a diplomatic row between the two nations.
Italy angered France by giving short-term visas to thousands of migrants who had already reached Italy - many of them Tunisian with French ties.
France agreed to drop its objections as part of the deal to set up patrols.
Meanwhile, Italy has deported its first group of migrants from the Mediterranean island of Lampedusa.
A plane carrying 30 Tunisians took off from Lampedusa on Thursday afternoon.
However, reports said two boats carrying hundreds of migrants arrived on the island on Friday.
Lampedusa lies about 120km (75 miles) off the Tunisian coast, and is the first port of call for migrants hoping to reach Europe.
Some 20,000 North Africans are thought to have fled the recent unrest sweeping the region, and Lampedusa has been swamped.
Italy has struggled to find a solution, so decided this week to offer six-month visas to the migrants, allowing them to travel anywhere in the EU.
France strongly objected to Italy's move, and French border patrols have been turning the migrants away.
In response, Italy had threatened to have France thrown out of the EU's Schengen passport-free travel zone.
But the countries' interior ministers thrashed out their differences in a meeting in Milan on Friday.
French minister Claude Gueant said he was now in "complete agreement" with his Italian counterpart Roberto Maroni.
He said neither country had a duty to host the migrants, and they had agreed to encourage the migrants to return voluntarily to Tunisia.