A British embassy convoy in Tripoli came under fire on Sunday in an attempted carjacking but no-one was hurt, a spokesman for London's mission in Libya said.
"Early this morning a British embassy convoy was subject to an attempted carjacking. Shots were fired at our vehicles but they managed to drive on and leave the area," spokesman Bob Phillipson said.
"All embassy personnel are safe and accounted for and there were no injuries," he said.
The attack took place in western Tripoli, witnesses said, and came after Washington evacuated its mission in the embattled Libyan capital under air cover on Saturday.
Carjackings are common in Tripoli and armed groups target the armoured vehicles used by foreign diplomats for theft.
Britain advised its citizens to leave the country on Sunday, following weeks of deadly clashes between rival militia around the airport road in Tripoli.
Berlin also advised German nationals to leave because of the unrest in the capital.
Tripoli international airport has been closed for two weeks because of deadly clashes in the area, and the United Nations evacuated its staff from Libya onj July 14 because of the violence.
Phillipson said that "in light of travel restrictions in and around Tripoli, we are reducing the number of staff at the Embassy," but that the mission "remains open for core business".