Four US military personnel have been freed after a brief detention by the Libyan government, a US official told AFP late Friday.
The four were released just two hours after the US State Department announced their detention, the official said, speaking on condition of anonymity.
Neither the State Department nor the Pentagon gave any further information on the case.
The New York Times, citing unnamed US officials, said the military staff were attached to the security team at the US embassy in Tripoli and may have been scouting escape routes for possible future use by diplomats.
Americans in Libya have been targeted more than once since 2011, when the regime of strongman Moamer Kadhafi was overthrown by local rebel groups backed by US and NATO airpower.
In September 2012 four people, including the US ambassador to Libya, were killed in an attack on the US consulate in the eastern city of Benghazi by Islamist gunmen with alleged Al-Qaeda ties.
And earlier this month an American teacher was gunned down during his morning jog in Benghazi in an attack blamed on Islamist extremists.
Libya's new authorities have struggled to integrate the rebel groups that helped topple the Kadhafi regime into the regular armed forces. Militias have carved out their own fiefdoms, each with its own ideology and regional allegiances.
In November, Secretary of State John Kerry and his British counterpart William Hague met in London with Libyan Prime Minister Ali Zeidan and agreed to help Libya crack down on militia violence.
The Pentagon also said that the US military were prepared to train between 5,000 and 8,000 Libyan army troops at a base in Bulgaria. There were also plans to train a separate counter-terrorism unit, said Admiral William McRaven, commander of US Special Operations Command.
But Libya and the United States have also had disagreements: in early October, US commandos seized senior alleged Al-Qaeda figure Abu Anas al-Libi -- indicted for the twin 1998 bombings of US embassies in east Africa -- on the streets of Tripoli and whisked him away to custody onboard a warship.
The suspect was then moved to New York, where he pleaded not guilty to the charges.
Libi's capture embarrassed the Libyan government, which denounced it as "kidnapping" and claimed it had not been given advance notice of the seizure.