The French government says it has evacuated French and British nationals from Libya, as battles rage between government forces and militias.
A French diplomatic source said 40 French nationals, including the ambassador, had been evacuated by ship along with seven British nationals.
France's embassy in Tripoli has been closed temporarily, the French foreign ministry said on its website.
Libya has been gripped by instability since the 2011 uprising.
The French government spokesman in Paris, Stephane Le Foll, announced that French and British nationals had been evacuated, without giving numbers.
An unnamed diplomatic source gave the numbers to France's AFP news agency, saying the expats had been evacuated by the French army.
They are aboard a warship bound for the southern French port of Toulon, the French foreign ministry said.
On Sunday, the US evacuated its embassy in Tripoli, citing a "real risk" because of the fighting.
Together with France, Germany and the UK, it advised its nationals in Libya to leave immediately.
The UN announced this week it was pulling its staff out.
France and the UK played an important role in enforcing a no-fly zone in Libya in 2011, when rebels toppled long-time leader Muammar Gaddafi, who was captured and killed.
Dozens of people have been killed in the fighting in recent weeks, which has centred on the city of Benghazi, where the main military base fell to Islamist-led militants on Wednesday.