The Ocean Viking was responding to a distress call to help a rubber boat carrying migrants off the Libyan coast.
Shots were reportedly fired at a humanitarian vessel as it tried to rescue a boat carrying migrants in the Mediterranean on Saturday.
The Libyan coastguard, trained and financed by the European Union, intercepted the Ocean Viking as it responded to a distress call from a rubber boat carrying some 80 people.
They approached "dangerously" and threatened the crew by "firing gunshots in the air," claimed SOS Mediterranee, which charters and runs the rescue vessel, forcing it to back off.
“You can’t shoot at us. You can’t shoot at us. We’re leaving the waters now,” a person on the Ocean Viking is heard saying in video footage of the incident.
The coastguard has not yet responded to a comment request.
All of the migrants on board were taken back to Libyan soil.
Yesterday's incident is the latest in a string of increasingly hostile moves by the Libyan coastguard as it tries to stem the flow of migrants to Europe.
In January, it prevented an SOS Mediterranee boat from returning after a rescue operation. Last year, it threatened to shoot down a monitoring plane owned by the German NGO Sea-Watch.
Libya has in recent years emerged as the dominant transit point for migrants and refugees escaping war, persecution or seeking a better life in Europe.
The oil-rich country plunged into chaos following a NATO-backed uprising that toppled and killed longtime autocrat Moammar Gadhafi in 2011.
Human traffickers have benefited from this chaos, smuggling in migrants across the country's lengthy borders, though some observers point out that if there were more safe and legal routes to enter Europe their business model would not exist.
Crossing the Mediterranean is the most dangerous migration route in the world, according to the International Organisation for Migration.
More than 26,000 people have either died or gone missing in the sea since 2014, with migrants crammed into rickety rafts that sometimes set off in rough seas.
According to figures from the Italian government, migrant arrivals have tripled in the first three months of 2023.
So far this year, more than 20,000 landed on Italy's shores. Some 6,500 people arrived in Italy during the same period in 2022.
The Louise Michel rescue ship, financed by the British street artist Banksy, was detained on Friday in waters off the Italian island of Lampedusa after it rescued 180 people in three separate operations.
“We still do not have an official written justification for the detention," it tweeted on Sunday. "We know of dozens of boats in distress right in front of the island at this very moment, yet we are being prevented from assisting. This is unacceptable."