Benghazi: Libya’s elected parliament agreed on Monday to return to UN-sponsored peace negotiations one week after pulling out and a delegate from its rival assembly said the talks would resume on Thursday.

Western powers see the UN talks as the only chance to end turmoil in Libya, where a power struggle between two rival governments and their armed factions risks pushing the North African country deeper into civil war four years after the fall of Muammar Gaddafi.

Fighting between the two factions has cut into Libya’s vital crude exports and has also allowed militants claiming loyalty to Daesh to gain a foothold in the large desert nation.

News of parliament’s move came just after militants shelled two Libyan oilfields, a security official said.

Forces loyal to Prime Minister Abdullah Al Thinni’s internationally recognised government and the elected parliament based in the east are battling Libya Dawn forces who took over the capital Tripoli last summer and set up their own government.

The elected House of Representatives (HoR) quit the UN talks last week after a double suicide bombing attack on an eastern town killed 45 people.

“The HoR voted today to resume the peace dialogue after we held a meeting with the UN envoy to Libya, Bernardino Leon,” spokesman Faraj Hashem said.

Salah Makhzoum, a deputy for the rival parliament, which is known as the GNC, a former assembly reinstated by Tripoli’s forces, said the talks would resume on Thursday in Morocco. A UN spokesman could not immediately confirm the statement.

Western powers and regional countries are concerned Libya’s conflict is spinning out of control and allowing the country to become a haven for extremists.

Egypt last month carried out air strikes on Daesh targets in Libya after militants there released a video purporting to show the beheading of kidnapped Egyptian Christians.

Islamist militants shelled Libya’s Bahi and Mabrouk oilfields on Monday, damaging a pipeline to the Al Sidra oil port, said Ali Hassi, a spokesman for forces protecting energy infrastructure. Fighting was continuing and he could not give details of the damage.

The UN talks have yielded little concrete progress so far toward a unity government, a lasting ceasefire and getting Libya’s transition to full democracy back on track. Ceasefires have been difficult to keep.

In another development on Monday that might complicate the UN talks, Khalifa Haftar was appointed as army commander for Libya’s internationally recognised government.

The appointment of Haftar, a former Gaddafi ally who later joined the 2011 revolution against the Libyan leader, is likely to stoke tensions with the Tripoli-based government, which sees his rise as a sign that the old guard is regaining strength.

“Khalifa Haftar for us is a war criminal,” GNC spokesman Omar Hmaidan said. “Of course, this measure will add to the escalation and complicate things.”