CAIRO -- After days of heavy combat among militias that highlights the chaos in Libya, the U.S. Embassy has been closed and its staff taken to safety in neighboring Tunisia, the State Department said Saturday.
Scores of people have been killed and injured in the battles, which have raged for weeks and shut down the international airport in Tripoli, the capital.
The U.S. Embassy is near where some of the heaviest fighting has occurred, and the rival militias are armed with heavy weapons that fell into their hands after the uprising three years ago that toppled Libya's late leader, Moammar Gadhafi. Several other embassies have been abandoned, and United Nations missions and aid groups also have fled.
"Regrettably, we had to take this step because the location of our embassy is in very close proximity to intense fighting and ongoing violence between armed Libyan factions," State Department spokeswoman Marie Harf said in a written statement.
According to news accounts, about 150 U.S. personnel made the journey to Tunisia. The Pentagon said the evacuation took about five hours. It occurred under the protection of U.S. F-16 fighters and other aircraft, and there were no incidents.
For months, the weakness of Libya's central government has left the country vulnerable to militia-instigated violence. The armed groups, which often break down along ethnic, regional or sectarian lines, were allies in the fight against Gadhafi, but have since turned on one another in a scramble for power and oil wealth.
The latest battles in Tripoli have mainly been between Islamists from the western city of Misurata and another armed group, the Zintan militia, which took control of the airport months ago and had been put on the government payroll to provide security there.
Instead, the airport became a war prize. The conflict was initially confined to the outskirts of the complex, but in recent days spilled onto the tarmac and into the terminal. An Airbus A330 belonging to state-owned Afriqiyah Airways was left smoldering on the runway five days ago. Estimates of damage to the airfield and its facilities run into the millions of dollars.
In an official travel warning, the State Department also urged all Americans who remain in the country to leave immediately, saying the situation is "unpredictable and unstable."
It said extremist groups in Libya this year had made "several specific threats" against U.S. citizens and interests in the country, and warned that Americans may be risking "kidnapping, violent attacks, or death."
The threat to U.S. personnel in Libya has been especially sensitive since September 2012, when the U.S. diplomatic compound in the eastern city of Benghazi was attacked and Ambassador J. Christopher Stevens and three other Americans were killed.
The country has also become a center of Islamist militant activity, a drug and arms smuggling nexus and a jumping-off point for illegal immigration into Europe.
The Obama administration, European allies and international organizations have declared their commitment to trying to restore Libya to stability. But Western powers have limited their involvement at a time when they face more urgent crises and economic pressures. And the efforts have been hindered by the weakness of the Libyan government, the militia battles and resistance in Congress to spending money on an oil-rich country.
Last year, a militia briefly abducted the then-prime minister, Ali Zeidan, and this year another armed group made a brazen bid to illicitly sell a tanker full of crude oil on the black market. Navy SEALs intercepted the vessel and returned it to the government.
In May, a rogue former general, Khalifa Haftar, launched a self-declared war on Islamist militias and their political allies, at one point sending forces to storm the parliament building and bomb Islamist bases with commandeered military aircraft.
Both Tripoli and Benghazi have been racked by political assassinations in recent months. In June, a prominent human rights lawyer and activist, Salwa Bougaighis, was killed in her Benghazi home. This month, an armed group looted a large cash shipment from the Central Bank.