Facing Escalating Violence, U.S. Evacuates Staff From Its Embassy in Libya

CAIRO — The United States closed its embassy in Libya on Saturday and evacuated the embassy’s staff under military guard, in what the State Department said was a response to escalating violence in the Libyan capital, Tripoli.

Officials called the evacuation “temporary” and said they were looking for ways to reopen the embassy, even as the State Department issued a new travel warning on Saturday, advising United States citizens to leave Libya “immediately.”

Weeks of heavy fighting between rival Libyan militias for control of Tripoli’s international airport had in recent days edged closer to the heavily fortified embassy, which is on the main road to the airport. The clashes have all but destroyed the airport, severely limiting air travel to Libya.

The embassy staff was evacuated over land, traveling in convoys to neighboring Tunisia under the watch of United States military aircraft, according to a Pentagon statement.

Speaking in Paris during a series of diplomatic meetings about Gaza, Secretary of State John Kerry said that the embassy was evacuated because of “freewheeling militia violence” and that the embassy was only “suspending” activities.

The evacuation, which follows the withdrawal of other foreign diplomats, deepened Libya’s isolation at a moment when violence in the country appears to be spiraling out of control. Libya’s weak central government has been powerless to halt weeks of broadening battles in Tripoli and in the eastern city of Benghazi, the country’s two largest cities, which have succumbed to a growing lawlessness and bloodshed.

As the militiamen have fought with heavy weapons in residential neighborhoods, with no central authority to stop them, armed groups have stepped up a campaign of assassinations and kidnappings targeting political activists, journalists and human rights workers.

The chaos has unnerved Libya’s neighbors, including Egypt, which has expressed alarm over militant groups operating on Libyan soil. Two weeks ago, the United Nations withdrew its staff from Tripoli in response to the fighting there, and on Friday, Turkey announced that it had suspended operations at its embassy in Tripoli.

The United States last closed its embassy in February 2011, during the Libyan revolt against the country’s longtime dictator, Col. Muammar el-Qaddafi. The Obama administration later opened a diplomatic post in eastern Libya, in Benghazi, an area that was under the control of anti-Qaddafi forces.

In September 2012, militants attacked the Benghazi mission, as well as a nearby annex used by the Central Intelligence Agency, killing the ambassador, J. Christopher Stevens, and three other Americans. The embassy in Tripoli had served as a base for investigators from the Department of Justice investigating the Benghazi attack.

In the last few days, shells fell near the embassy as the militias clashed using heavy weapons, residents said. The current United States ambassador, Deborah K. Jones, wrote about the approaching violence on Twitter. “A Libyan citizen reports from Gasr bin Ghashir indiscriminate shelling from early evening,” she wrote on July 19, referring to a neighborhood abutting the airport.

The next day, she wrote about “heavy shelling and other exchanges” in the embassy’s neighborhood. On Wednesday, she tried to tamp down a rumor that United States drones were operating over Libyan airspace. “We are not engaged in this fighting, just trying to stay safe under fire,” she wrote.

During the evacuation early Saturday, residents in Tripoli reported hearing the sounds of airplanes overhead. A resident who lives within sight of the embassy said that militias who were fighting around the airport held their fire as the airplanes circled. At 5 a.m., convoys of cars appeared on the airport road. A Pentagon spokesman, Rear Adm. John F. Kirby, said the evacuation, which took approximately five hours, was secured by United States Marines who had been working at the embassy and military aircraft, including F-16s.

In a statement on Saturday, Marie Harf, a State Department spokeswoman, said the decision to evacuate was not made lightly.

“Securing our facilities and ensuring the safety of our personnel are top department priorities,” she said, adding that the United States was “exploring options for a permanent return to Tripoli as soon as the security situation on the ground improves.”

After the withdrawal on Saturday, the embassy compound sat empty and unguarded. No one answered at the front gate. A man driving away from the compound and clearly frustrated asked a reporter if he worked at the embassy.

“There was no one here,” he said.

The Americans had been processing documents for him — he did not specify what kind — but now, those documents were stuck inside.

A version of this article appears in print on , Section A, Page 6 of the New York edition with the headline: Facing Escalating Violence, U.S. Evacuates Staff From Its Embassy in Libya. Order Reprints | Today’s Paper | Subscribe