TRIPOLI (Reuters) - Gunmen opened fired on a United Nations convoy on a coastal road west of the Libyan capital, Tripoli, on Wednesday, an incident that could complicate the gradual return of diplomatic and other international staff to Libya.

“The U.N. Support Mission in Libya (UNSMIL) confirms that a U.N. convoy was hit today traveling between Surman and Tripoli,” a statement from the mission said, adding there were no reports of casualties among U.N. staff.

A member of parliament for Zawiya, Abdallah Alafi, said five male U.N. staff and two female staff had been held briefly and then released and would be transferred to Tripoli.

It was not clear why the convoy was hit and whether the staff had been detained or held for their own protection.

A picture circulating on social media showed an unmarked white vehicle of the kind used by U.N. staff in Libya apparently immobilized on the edge of a road, with the front wheel casing badly damaged and shatter marks on two of the windows.

“UNSMIL thanks the Government of National Accord, House of Representative Members from Zawiya and local authorities for their help in ensuring the safety of U.N. staff and is looking forward to their safe return to Tripoli,” the U.N. statement said.

Surman is just west of the city of Zawiya. A number of militias have a presence in the area and the road is often closed because of local disputes. Kidnappings are common.

UNSMIL along with most diplomatic missions evacuated from Tripoli to neighboring Tunisia in 2014 as rival factions battled for control of the Libyan capital.

Since last year, when the U.N.-backed Government of National Accord (GNA) arrived in Tripoli, the mission and U.N. agencies have gradually been increasing their presence in Libya with regular visits by international staff.

Diplomatic staff have also been visiting more frequently, and the Italian and Turkish embassies reopened in Tripoli earlier this year.

However, the security situation in and around capital remains fragile, with armed groups retaining the power that they have held since the NATO-backed uprising that overthrew Muammar Gaddafi in 2011.