The U.S. State Department says four military personnel who were detained briefly Friday by the Libyan government have been released.
State Department spokeswoman Jen Psaki said the four were participating in "security preparedness efforts" when they were taken into custody near Sabratha, an area known for its Roman ruins.
Psaki had announced the detention of the Americans just hours earlier.
She said late Friday the State Department is "still trying to ascertain the facts of the incident."
Psaki said the U.S. values its relationship with "the new Libya" and supports "Libya's historic democratic transition."
A report in The New York Times, citing unidentified officials, said the four were believed to have been reviewing potential evacuation routes for diplomats when they were detained.
Americans in Libya have sometimes been targeted since 2011 when dictator Moammar Gadhafi's government was overthrown by local rebel groups backed by U.S. and NATO air power.
In late 2012, Islamist militants assaulted the U.S. consulate in Benghazi, killing the U.S. ambassador to Libya and three other Americans.
Earlier this month in Benghazi, an American teacher was gunned down during his morning run.