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.