The UN launched talks among Libyans on Monday aimed at creating a unity government and preparing for elections to bring peace after a decade of violence in the North African country.

The 75 delegates, selected by the UN to represent existing state bodies and groups from across Libya's political and social spectrum, met in Tunisia after months of relative calm and a key ceasefire deal in October.

"You have the opportunity to end a tragic conflict," UN Secretary-General Antonio Guterres told delegates in a video message at the opening ceremony.

"Now it's your turn to shape the future of your country."

The UN acting envoy to Libya Stephanie Williams spoke of "rare optimism" and said "after... many years of crisis, I believe there is finally a glimmer of hope".

Libya has seen a decade of violence since the 2011 toppling of dictator Moamer Kadhafi in a NATO-backed uprising, with a complex web of regional conflicts exacerbated by foreign interventions.

But October's ceasefire deal between two rival administrations in the east and west of the country has allowed for economically vital oil production to resume and spurred progress on efforts to end years of political deadlock.

This week's talks at a luxury hotel in Gammarth, near the Tunisian capital Tunis, aim to unify Libya under a single interim executive and pave the way for national elections.

As well as preparing for national polls, the interim executive will face the daunting challenges of providing basic services in a country wracked by economic woes and the novel coronavirus pandemic.

UN acting envoy to Libya Stephanie Williams speaks at the opening of the Libyan Political Dialogue Forum hosted in Gammarth on the outskirts of the Tunisian capital
UN acting envoy to Libya Stephanie Williams speaks at the opening of the Libyan Political Dialogue Forum hosted in Gammarth on the outskirts of the Tunisian capital AFP / Fethi Belaid

Peter Millett, a former British ambassador to Libya, told AFP the most important task of the talks was to agree a timeline for elections.

"It needs to be short, maximum nine months, with key milestones for implementing and a clear message from the international community that they will impose sanctions on anyone who obstructs it," he said.

Libya is dominated by two rival administrations, each backed by foreign powers and a multitude of armed groups.

The Government of National Accord (GNA), based in Tripoli, which emerged after previous UN-backed talks in 2015, is supported by Turkey.

In the east, military strongman Khalifa Haftar supports a rival administration with backing from Russia and the United Arab Emirates.

Haftar launched an offensive in April 2019 to seize the capital, trashing a previous round of UN efforts at peace talks.

But in June, after a bloody year-long stalemate, Turkish-backed pro-GNA forces pushed him into a rapid retreat to the centre of the country.

Military engineers of the UN-recognised Libyan Government of National Accord detonate an explosive device uncovered from areas south of the capital Tripoli on October 12
Military engineers of the UN-recognised Libyan Government of National Accord detonate an explosive device uncovered from areas south of the capital Tripoli on October 12 AFP / Mahmud TURKIA

Claudia Gazzini, a Libya expert with International Crisis Group, told AFP that for some Libyans, "you don't have a clear winning party, nobody really won or lost".

"There are all the right conditions for serious peace talks," she said.

But, she added, "there are important groups in Tripoli with legitimate concerns, who suffered in the fighting, and who resist the idea of giving half the pie to those who they were at war with."

On the streets of Tripoli there were mixed feelings about the talks.

"For the ordinary citizen nothing will change as long as foreigners decide for us," Malek Abdallah, a pharmacist in the Libyan capital, told AFP.

But Ismail al-Mahdaoui, a retired civil servant, believes the Gammarth talks are a chance "to turn the page on the war" and called for "international pressure on countries involved in Libya".

University professor Jalal al-Fitouri agreed, saying an end to Libya's conflict depends on an "international will, because foreign players control the parties at conflict".

The UN and world leaders have welcomed the talks.

Guterres urged world powers to support peace efforts and to respect a long-standing UN arms embargo.

Tunisian President Kais Saied hailed a "historic moment" at the opening ceremony.

"We are able to overcome all difficulties and obstacles... when there is no interference from outside powers," he told Libya's delegates.

French Foreign Minister Jean-Yves Le Drian, speaking from Morocco, said there was a "positive dynamic" underway and noted some "encouraging decisions", but he urged caution, "because the past has sometimes led us to disappointment".

The head of the European Union's delegation to Libya, Jose Sabadell, voiced the bloc's support for the talks.

The "EU strongly supports this meeting to agree on new unified executive governance & roadmap to elections ASAP," he tweeted.

But despite relative peace on the ground, many analysts have limited hopes that the talks will lead to a lasting peace.

Millett, who was involved in the UN-led process that produced the GNA in 2015, warned: "If potential spoilers like Haftar and the militias don't see themselves benefitting, hostilities could break out again."