Washington: The United States shuttered its embassy in Libya on Saturday and evacuated its diplomats to neighbouring Tunisia under US military escort as fighting intensified between rival militias. Secretary of State John Kerry said “free-wheeling militia violence” prompted the move.

American personnel at the Tripoli embassy, which had already been operating with limited staffing, left the capital around dawn and travelled by road to neighbouring Tunisia, with US fighter jets and other aircraft providing protection, the State Department said. The withdrawal underscored the Obama administration’s concern about the heightened risk to American diplomats abroad, particularly in Libya where memories of the deadly 2012 attack on the US mission in the eastern city of Benghazi are still vivid.

The evacuation was accompanied by a new State Department travel warning for Libya urging Americans not to go to the country and recommending that those already there leave immediately. “The Libyan government has not been able to adequately build its military and police forces and improve security,” it said. “Many military-grade weapons remain in the hands of private individuals, including anti-aircraft weapons that may be used against civilian aviation.”

Speaking Saturday in Paris where he was meeting with other diplomats on the Israeli-Palestinian conflict, Kerry said the US remains committed to the diplomatic process in Libya despite the suspension of embassy activities there. State Department spokeswoman Marie Harf said the evacuated employees will continue to work on Libyan issues in Tunis, elsewhere in North Africa and Washington.

“Securing our facilities and ensuring the safety of our personnel are top department priorities, and we did not make this decision lightly,” Harf said. “Security has to come first. 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.”

The Pentagon said in statement that F-16 fighter jets and other US aircraft provided security. “The mission was conducted without incident, and the entire operation lasted approximately five hours,” the statement said.

The State Department said embassy operations will be suspended until a determination is made that the security situation has improved. Tripoli has been embroiled for weeks in inter-militia violence that has killed and wounded dozens on all sides. The fighting has been particularly intense at the city’s airport.

“We are committed to supporting the Libyan people during this challenging time, and are currently exploring options for a permanent return to Tripoli as soon as the security situation on the ground improves,” Harf said.

Rep Howard “Buck” McKeon, the House Armed Services Committee chairman, expressed gratitude for the work of the US forces that helped in the evacuation.