The ceasefire announcement came after a car bomb killed 3 UN staff in Benghazi.

Forces battling for control of Libya‘s capital, Tripoli, have agreed to a truce on the eve of the Muslim festival of Eid al-Adha.

The announcement on Saturday came as a car bomb killed three United Nations staff in the eastern city of Benghazi, the stronghold for the self-styled Libyan National Army (LNA).

The UN is trying to broker a truce in Tripoli, where the LNA in April launched a surprise attack to seize the city from forces loyal to the internationally-recognised Government of National Accord (GNA).

The global agency had called on both sides to commit to a humanitarian truce by midnight on Friday.

The spokesman for renegade military commander Khalifa Haftar, Ahmad al-Mesmari, announced “a halt to all military operations … in the suburbs of Tripoli”.

The ceasefire was “out of respect for this occasion’s place in our spirits … so that Libyan citizens can celebrate this Eid in peace,” he said.

The GNA had said late on Friday that it was eager to “ease the suffering of the citizens and allow rescue workers to accomplish their mission” and would accept “a humanitarian truce for Eid al-Adha”.

But it listed several conditions, saying the ceasefire must be observed “in all combat zones, with a cessation of direct and indirect fire and movement of troops”.

It also said the truce must include “a ban on flights and reconnaissance overflights” across the country’s entire airspace.

The GNA also called on the UN Support Mission in Libya (UNSMIL) to “ensure the implementation of the truce and note any breaches”.

In Haftar-controlled Benghazi, a car bomb killed three UN staff – a Libyan and a Fijian – as a UN convoy passed through a shopping area, security and medical officials said.

The explosion took place outside Arkan Mall in the Hawari neighbourhood on Saturday, where people were shopping.

No group immediately claimed responsibility for the attack.

UN Secretary-General Antonio Guterres condemned the latest attack in Benghazi, calling “on all parties to respect the humanitarian truce during Eid al Adha and return to the negotiating table to pursue the peaceful future the people of Libya deserve,” according to a statement.

The UN Security Council was due to meet later on Saturday, at the request of France, to discuss the latest developments in Libya.