CAIRO — Libyan rivals on Monday restarted military and security talks, aiming to reach a settlement that could help end the county’s years-long conflict, the United Nations said.

The U.N. support mission in Libya said in a brief statement that military and police teams from eastern and western Libya met in Egypt’s Red Sea resort of Hurghada.

The face-to-face military talks came amid international pressure on both sides of the war and their foreign backers to avert an attack on the strategic city of Sirte, after a year-long assault on the capital, Tripoli, by forces of military commander Khalifa Hifter collapsed this summer.

The U.N. mission said both sides have demonstrated “a positive and proactive attitude aimed at de-escalation of the situation in central Libya.”

The outcome of the Egypt-based negotiations will be mainstreamed into U.N.-brokered military talks, the U.N. mission said.

Oil-rich Libya was plunged into chaos when a NATO-backed uprising in 2011 toppled longtime dictator Moammar Gadhafi, who was later killed. The country has since split between rival east- and west-based administrations, each backed by armed groups and foreign governments.

Hifter’s forces launched an offensive in April 2019 to try and capture Tripoli. But his campaign collapsed in June when the Tripoli-allied militias, with heavy Turkish support, gained the upper hand, driving his forces from the outskirts of the city and other western towns.

Hifter is supported by Egypt, the United Arab Emirates and Russia. Tripoli-allied militias have backing from Turkey, a bitter rival of Egypt and the UAE in a broader regional struggle, as well as from the wealthy Gulf state of Qatar.

Fighting has died down in recent months, but both sides were preparing for a possible battle over Sirte, the gateway to Libya’s major oil fields and export terminals, controlled by Hifter.

Egypt-based military and security talks came after both sides, under heavy international pressure, agreed earlier this month on a preliminary deal that aims to guide the country toward elections within 18 months and demilitarize Sirte, which is held by Hifter.

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.