SKHIRAT- Delegates from Libya's warring factions signed a UN-brokered agreement on Thursday to form a national unity government, a deal that Western powers hope will bring stability and help to combat a growing Islamic State presence.
Four years after Muammar Gaddafi's fall, Libya is deeply fractured, with a self-declared government in Tripoli and an internationally recognised one in the east - each backed by coalitions of former rebels and militias.
The UN deal calls for a presidential council to lead a unified government, but hardliners in both factions reject it and questions remain about how it will be implemented in a country where rival armed brigades hold the key to power.
Chants of "Libya! Libya!" erupted as representatives from both parliaments signed the accord along with local councils and political parties in the Moroccan coastal town of Skhirat, after more than a year of hard-scrabble negotiations.
"The doors remain wide open to those who are not here today," UN envoy Martin Kobler said at the ceremony, attended by regional foreign ministers. "The signing of the political agreement is only the first step."
Western officials believe war fatigue, promises of foreign aid, the strain on Libya's oil economy and the common threat of Islamic State will help to build momentum for the national government and bring opponents on board.