Libya's coastguard on Wednesday intercepted a wooden boat packed with almost 500 migrants after duelling with a German rescue ship and coming under fire from traffickers, the navy said.
The migrants, who were bound for Italy, were picked up off the western city of Sabratha, said navy spokesman Ayoub Qassem.
The German non-governmental organisation "Sea-Watch tried to disrupt the coastguard operation... inside Libyan waters and wanted to take the migrants, on the pretext that Libya wasn't safe," Qassem told AFP.
Sea-Watch posted a video on Twitter of what it said was a Libyan coastguard vessel narrowly cutting across the bow of its ship.
"This EU-funded Libyan patrol vessel almost crashed (into) our civil rescue ship," read the caption.
Qassem also said the coastguard had come under fire from people traffickers, without reporting any casualties.
The 493 migrants included 277 from Morocco and many from Bangladesh, said Qassem, and 20 women and a child were aboard the boat. All were taken to a naval base in Tripoli.
There were also migrants from Syria, Tunisia, Egypt, Sudan, Pakistan, Chad, Mali and Nigeria, he added.
According to international organisations, between 800,000 and one million people, mostly from sub-Saharan Africa, are currently in Libya hoping to make the perilous Mediterranean crossing to Europe.
Between 7,000 and 8,000 migrants are being held in Libyan detention centres after entering the country illegally, an immigration official said on Tuesday.
The North African country has long been a stepping stone for migrants seeking a better life in Europe. Smugglers have stepped up their lucrative business in the chaos which has engulfed Libya since its 2011 revolution.