Two Germans who helped save migrants from drowning in the Mediterranean Sea have been released by Libyan authorities after their brief detention in the capital Tripoli.



The pair were held by the Libyan coastguard, the group Sea Eye said Wednesday, adding that the circumstances of their arrest remain unclear.



The two were released late Monday, said Hans-Peter Buschheuer, spokesman for the humanitarian group that rescues migrants at sea who are trying to reach Europe from North Africa.



Libya's navy had said the group's vessel, Speedy, had entered Libyan waters, and that the aid workers had sought to flee but stopped after warning shots were fired.



It later said the two men admitted falling asleep before realising they were no longer in international waters.



But Buschheuer questioned the Libyan account.



"We have no written proof of the original location at the time of the arrest because Speedy was also taken and is still in Libya," he said.



"But close to where the arrest took place, there were other NGOs from different countries... who saw the event and can attest that we were outside the 12-mile zone - that is, we were in international waters," he said.



Buschheuer said one of the groups which witnessed the event was Spanish non-government organisation Openarms.



Sea Eye is now working on securing the release of the ship, he said.



"We are working with the help of the German embassy in Libya to obtain the release of the ship," said Buschheuer.



"If that fails, then we would have to file a suit. The ship is worth 110,000 euros ($120,000) and an important part of our future rescues."



War-torn Libya with its 1,770 kilometres (1,100 miles) of coastline has become a popular staging point for migrants seeking to reach Europe.



Many board rickety, makeshift boats in the hopes of reaching the Italian island of Lampedusa some 300 kilometres away.



On Saturday, 2,300 people were rescued from 18 small boats that were headed for Italy, while thousands of other migrants have been saved in recent weeks.