Rival Libyan politicians signed a deal Thursday to form a unity government despite opposition on both sides, in what the United Nations described as a "first step" towards ending the country's crisis.
World powers have urged the warring factions to break a political deadlock that has allowed jihadists and people-smugglers to flourish since the fall of dictator Moamer Kadhafi in 2011.
A group of lawmakers from Libya's rival parliaments, as well as other political figures, inked the UN-sponsored accord in the Moroccan resort of Skhirat, an AFP journalist said.
Around 80 of 188 lawmakers from the internationally recognised parliament and 50 of 136 members of the Tripoli-based General National Congress (GNC) signed the deal, participants said.
It calls for a 17-member government, headed by businessman Fayez el-Sarraj as premier and including two women, based in Tripoli. There would also be a presidential council for a transitional period of two years up until legislative elections.
The French ambassador, Antoine Sivan, said in a statement the UN Security Council would adopt a resolution within days "recognising this government as the only legitimate government of Libya".
But the accord has caused deep divisions within Libya's two legislatures.
GNC member Mahmoud Abdelaziz complained: "There are two parliaments and two governments. Now they are going to impose a third government on us instead of bringing together the two rival authorities."
The heads of both parliaments already warned that the accord lacked legitimacy and that those who signed it represented only themselves.
GNC head Nouri Abusahmein said Wednesday "whoever has not been commissioned by the GNC to sign or initial a deal on its behalf is, and will remain, without legitimacy."
A government such as that proposed by the United Nations "does not even guarantee the minimum required to ensure its effectiveness", he added.
Signup to our newsletter and follow us on Facebook and Twitter!
- Much to be done -
While Western powers and NATO welcomed Thursday's deal, UN envoy Martin Kobler acknowledged that much remained to be done.
"This is just the beginning of a long journey for Libya. Signing is only the first step on the road to putting Libya back on the right track," he said at the ceremony.
"The door is always open to those who are not here today. The new government must move urgently to address the concerns of those who feel marginalised."
UN chief Ban Ki-moon echoed those remarks, while US Secretary of State John Kerry said Libya "needs this unified government to address its critical humanitarian, economic, and security challenges".
Leaders from Britain and France as well as the EU's foreign policy chief and the head of NATO, also welcomed the deal.
The signing follows a gathering in Rome of a US- and Italian-led group of world powers and regional players that called on the two sides Sunday to lay down their arms and back a new unity government.
Delegations from both sides in October approved a draft agreement negotiated under the auspices of the UN, but it was later rejected by their parliaments.
GNC chief Abusahmein and those MPs who support him are not against an agreement, but say they want more time to negotiate it.
On December 6, members of the two bodies launched an alternative process in Tunis by signing a "declaration of interest" on a unity government, a process backed by the two parliament heads.
The country has been mired in chaos since the 2011 overthrow and killing of long-time dictator Kadhafi.
The recognised government says a UN arms embargo is hampering the battle against the Islamic State (IS) group, which seized control of the coastal city of Sirte in June.