The Italian navy has taken back control of a Sicilian fishing boat that was seized by the Libyan coastguard up to 64km (40 miles) off the coast of Libya.
The Italian defence ministry said that naval personnel boarded the ship.
The vessel, with three Italians and four Tunisians on board, was initially thought to have been taken to the Libyan port of Misrata.
The Libyan coastguard said it seized the vessel and arrested the crew after they had entered Libyan waters.
A spokesman told the BBC that they did so without a fishing permit and had breached Libyan sovereignty.
“It was a peaceful operation, no shots were fired,” he said.
The Italian navy, in a statement on Friday, said that military personnel in the area on migrant rescue duties responded to reports of the fishing boat seizure.
The condition of the fishing boat crew is unclear.
A spokesman for the Italian fishing co-operative told the BBC that there have been 12 such seizures by Libya since 2005.
The gunmen initially appeared to be militia members using an unmarked government boat, the spokesman said.
The fishing co-operative has described the incident as “an act of piracy” and said that, since 2005, Libya has insisted that its territorial waters extend more than 112km off shore – much further than international agreements allow.
The co-operative said Libya’s deteriorating security situation – the country is in effect fragmented with rival parliaments backed by warring militias – had added to concerns about the safety of the crew.