The United States has temporarily closed its embassy in Libya and evacuated the staff to neighboring Tunisia because of heavy fighting near the embassy site in Tripoli.
The State Department says it has suspended embassy operations due to "ongoing violence between Libyan militias."
In a Saturday statement, officials also recommended that U.S. citizens in Libya depart immediately.
U.S. Secretary of State John Kerry said "freewheeling militia violence" is taking place in the capital. And although a lot of the violence in Tripoli is not targeting the embassy, he said, the "very real risk" to personnel prompted the decision to evacuate diplomatic staff overland to Tunisia, from where they will move on to other locations to continue efforts to ease the unrest.
"We are deeply committed and remain committed to the diplomatic process in Libya," Kerry told media in Paris on Saturday, where he is meeting with other diplomats on the Israeli-Palestinian conflict. "Our envoy will continue to be engaged with the British envoy and other envoys. ... We call on all Libyans to engage in the political process and to come together in order to avoid the violence."
On Friday, the Turkish Foreign Ministry announced it had suspended operations at its embassy in Tripoli and moved more than 500 Turkish nationals to Tunisia.
Rival militias are battling for control in Tripoli at a time when a weak central government is riven by divisions between Islamist, tribal, and nationalist factions. Recent weeks have seen some of the country's deadliest fighting since former leader Moammar Gadhafi was ousted in 2011.
Nearly 50 people were killed during clashes between Islamist-led fighters from Misrata and Zintan rebels earlier this month as the groups fought for control of the airport.
The Libyan government and parliament have struggled in their efforts to control the militias.
The State Department says Libya's security situation remains "unpredictable and unstable," and that the government has not been able to "adequately build its military and police forces" following the 2011 revolution. Many "military-grade weapons" have remained in the hands of private individuals, officials say.
The security of U.S. personnel in Libya remains a sensitive issue, after four Americans, including Ambassador Chris Stevens, were killed in a 2012 attack on the U.S. mission in Benghazi.
The International Criminal Court is investigating the current violence.