TRIPOLI (Reuters) - Libya’s coastguard said it had intercepted nearly 500 migrants packed onto a wooden boat and returned them to Tripoli on Wednesday after warning off a ship that was preparing to pick them up for passage to Europe.

Illegal migrants arrive by boat at a naval base after they were rescued by Libyan coastguard in the coastal city of Tripoli, Libya, May 10, 2017. REUTERS/Ismail Zitouny

Footage filmed by Sea-Watch, a non-governmental organization, showed a Libyan coastguard vessel coming within meters of its own ship as it sped to stop the migrants.

Tripoli coastguard spokesman Ayoub Qassem said the incident occurred about 19 miles (30 km) north of Libya’s coast.

It highlighted the confusion in the crowded waters as desperate migrants try to reach a better life and authorities scramble to deal with the chaos.

“An international rescue organization called Sea-Watch tried to hinder the work of our coastguard ... in a bid to take the migrants, claiming Libya is not safe for migrants,” he said.

Qassem said the coastguard had also exchanged fire with smugglers, but gave no details.

Ruben Neugebauer, a spokesman for Sea-Watch, said the NGO had received instruction from Italy’s coastguard control center in Rome that the Libyan coastguard would be taking over “on-scene command”, and that the Sea-Watch ship had stopped to await further instructions.

Slideshow ( 6 images )

“Without any warning, they crossed our bow on the way to the migrant boat,” Neugebauer said. “They made an extremely dangerous maneuver. They nearly hit our boat, they endangered our crew.”

Libya is the main departure point for migrants hoping to reach Europe by sea. The country has been in turmoil for years and migrants living there or passing through say they are subject to a range of abuses. A record 181,000 made the trip in 2016 and arrivals in Italy so far this year are up 30 percent. Most are from sub-Saharan Africa.

PERILOUS JOURNEY

Most migrants attempt the perilous journey on flimsy inflatable boats provided by smugglers that are barely equipped to make it to international waters. Larger wooden boats carrying several hundred migrants are rarer.

Some migrants are turned back by the Libyan coastguard, which generally delivers them to detention centers notorious for poor conditions and ill-treatment. The coastguard is receiving training from the European Union as it seeks to limit migrant departures and deaths.

Other migrants are taken to Italy after being picked up by NGO ships that run rescue missions, European or Italian naval and coastguard patrols, and other international vessels.

Qassem said the wooden boat intercepted on Wednesday was carrying nearly 300 Moroccans, 145 Bangladeshis, 23 Tunisians, and other migrants from elsewhere in Africa and the Middle East.

Those on board said they had left the western Libyan city of Sabratha on Tuesday night. There were about 20 women, some five of whom were being taken for medical treatment as they arrived in Tripoli. One appeared to be seriously ill.

One 24-year-old Moroccan man said he had come to Libya five weeks earlier in order to try to reach Europe. A 28-year-old man, also Moroccan, said he had been working in Libya for four years, but had decided to leave because the situation was deteriorating.

A Syrian woman on board said she had traveled through six countries to reach Libya, paying $1,000 in each and leaving two sons aged 12 and 13 behind in Jordan.

“I wanted to leave for Europe,” she said. “It was an attempt to get a better life and reunite my whole family in Europe, but unfortunately we couldn’t make it.”