Gunmen attacked a UN convoy on Wednesday near Zawiyah, about 50 kilometres (30 miles) west of the Libyan capital, a security source in the town said.
The source was unable to say whether there were any casualties among the seven members of the United Nations Support Mission in Libya (UNSMIL) who came under attack.
The British ambassador to Libya, Peter Millett, was quick to condemn the attack on his Twitter account.
“Disturbed by attack on @UNSMILibya convoy. Hope all safe. UN staff represent international community’s commitment to help #Libya-n people,” he tweeted.
The UN mission was not immediately reachable for comment.
Libya has been wracked by chaos since the 2011 uprising that toppled and killed longtime dictator Moamer Kadhafi, with rival authorities and militias battling for control of the oil-rich country.
Diplomats in Libya have been targeted regularly by assailants and kidnappers since then.
On September 11, 2012, suspected jihadists linked to Al-Qaeda attacked the US consulate in Benghazi, in eastern Libya, killing ambassador Christopher Stevens and three other Americans.
By 2014, most diplomatic missions had left the North African country, including that of the United Nations.
UNSMIL is based in Tunis, the capital of neighbouring Tunisia, but its members regularly carry out missions inside Libya.
Join GhanaStar.com to receive daily email alerts of breaking news in Ghana. GhanaStar.com is your source for all Ghana News. Get the latest Ghana news, breaking news, sports, politics, entertainment and more about Ghana, Africa and beyond.