Roiled by turmoil ever since the NATO-backed ouster of dictator Moamer Kadhafi in 2011, Libya's security has continued to deteriorate, prompting calls for an easing of an arms embargo to help the internationally recognised government regain some control.
The beheading this week of 21 mainly Egyptian Coptic Christians by the Islamic State group sparked Cairo to launch air strikes against the jihadists in Libya and call for an international coalition to hit IS.
But Western and Arab states have flinched at the suggestion of force, and UN envoy Bernardino Leon told the UN Security Council Wednesday that the only cure for Libya's trauma was political.
Claudia Gazzini of the International Crisis Group said a political accord would be "difficult, but not impossible to achieve."
"The international community must stay focused on supporting the dialogue efforts and resist calls to lift the arms embargo," the analyst said.
Libya is awash with weapons and rival militias are battling for control of its cities and oil wealth. It has two rival governments and parliaments, one recognised by the international community and the other with ties to Islamists.
Any additional weapons could strengthen the divisive General Khalifa Haftar, whose forces are fighting Islamist militias in battles that widen the gulf between competing factions.
One UN diplomat said lifting the arms embargo would be tantamount to pouring fuel on the fire.
Mohamed El-Jareh, non-resident fellow with the Atlantic Council's Hariri Centre for the Middle East, said the international community was "running of out of time" to save Libya.
"The threat of Islamic State in Libya is set to increase exponentially," he warned.
Since launching efforts at dialogue in September, Leon has been unable to bring together leading players from rival camps.
Signup to our newsletter and follow us on Facebook and Twitter!
The UN envoy's best achievement so far has been to begin "indirect" talks last week between the internationally recognised government and the General National Congress, which is under the leadership of Fajr Libya, a coalition of mainly Islamist militias currently controlling the capital Tripoli.
But observers believe efforts to bridge the gap between the two sides will fail so long as their respective armed factions -- Haftar for the elected government and Fajr Libya for the GNC -- are not at the same table.
- 'Powder keg' -
"It is very difficult, but with dialogue everything is possible," said Libya analyst Khaled al-Hetch.
He sees one solution as "giving Haftar the post that he wants", the supreme leadership of Libya's armed forces, in return for forming a unity government made up of representatives from both sides.
This week a lawmaker party to the talks, Tarek al-Jerouchi, said world leaders wanted their favoured parliament -- exiled in the remote east since Fajr Libya took Tripoli last year -- to remove Haftar from the scene.
It is a demand supported by Ibrahim al-Karaz, political science professor at the University of Tripoli, who said he viewed Haftar as an "obstacle" to a political solution.
Karaz also criticised Egypt for getting involved in the Libyan crisis.
"Egypt and other countries in the region need to stop interfering in Libyan affairs. It is foreign intervention that complicates all political processes," he said.
Analysts said the situation has been further muddied by Libya's rival factions each having its own regional backers. Egypt, the United Arab Emirates and Saudi Arabia are said to support Haftar, with Qatar and Turkey favouring Fajr Libya.
"These countries are setting fire to the powder keg," said Saad Djebbar, a London-based analyst.
"In Libya there is a fight for influence between regions and tribes. Each of them wants to say their piece. The international community needs to reassure each player and make them understand that they all have a place in the new Libya."