Italy's parliament has approved a plan to send naval boats to Libya as part of efforts to stop migrants crossing the Mediterranean Sea.
Two vessels are being deployed initially, in what the government says is an operation to help the Libyan coastguard and target people smugglers.
Italy is the main recipient of migrants making the dangerous crossing from Libya.
Earlier Italy impounded a German rescue ship on the island of Lampedusa.
The crew on board the Iuventa, operated by German NGO Jugend Rettet, is being questioned on the orders of the Italian prosecutor.
While the NGO said the check was "standard procedure", police said there the ship was seized due to evidence of "facilitating illegal immigration".
Two Syrian migrants were taken ashore from the vessel, Italian media reported.
Lampedusa, a tiny Italian island near North Africa, has struggled to house boatloads of migrants in recent years.
Jugend Rettet is one of several search-and-rescue NGOs operating in the Mediterranean that has rejected an Italian code of conduct, which had just come in to play to deal with the issue.
The NGOs object to the requirement for armed police to board their ships and for rescuers to stop transferring migrants from one ship to another. They want to minimise their trips back to port, because those trips cost them precious time and money.
- Surviving the deadliest migration route
- France plans asylum 'hotspots' in Libya
- Jailed and ransomed in Libya
Soon after the Italian parliament's vote, a patrol boat entered Libyan waters and headed for the capital Tripoli.
The Italian Defence Minister Roberta Pinotti stressed the mission would not be a "blockade" preventing migrant boats from leaving.
However, rights groups have warned that those sent back to Libya face abuse at the hands of traffickers.
Italy says its naval deployment is being negotiated with the UN-recognised Libyan government in Tripoli, led by Prime Minister Fayez Sarraj.
Mr Sarraj said his administration had agreed to receive only training and arms from Italy. "Libya's national sovereignty is a red line that nobody must cross," he said.
More than 94,000 migrants have crossed the Mediterranean to Italy so far this year, according to the UN - a record number. More than 2,370 have died trying to reach Italy.
Arrivals in July though were down dramatically on the same month last year - 11,193 compared with 23,552, according to the Interior Ministry.
Migrants picked up in Libyan coastal waters - and not international waters - can be legally returned to Libya, but aid workers say conditions in migrant reception camps there are dire.
Since 2015 as many as a dozen NGO aid ships have been patrolling off Libya to pick up migrants in distress. So far this year they have handled 35% of the rescues, Italy's coastguard says.
A note on terminology: The BBC uses the term migrant to refer to all people on the move who have yet to complete the legal process of claiming asylum. This group includes people fleeing war-torn countries such as Syria, who are likely to be granted refugee status, as well as people who are seeking jobs and better lives, who governments are likely to rule are economic migrants.