Libyan head of representative delegation to the House of Representatives Jalal Salah Abd Assalam (L), Moroccan Minister of Foreign Affairs Nasser Bourita and Libyan head of the representative delegation of the Supreme Council of the State Omar Mohamed Aboulifa (R), attend a meeting of the joint committee of the Libyan house of representatives, early on June 7 , 2023 in Bouznika. AFP
Election were due to be held in December 2021 but were never organised as differences persisted on key issues including who should run in the polls.
Libya has been torn by more than a decade of stop-start conflict since a 2011 revolt toppled strongman Moamer Kadhafi, with a myriad of militias forming opposing alliances backed by foreign powers.
The country remains split between a nominally interim government in Tripoli in the west, and another in the east backed by military strongman Khalifa Haftar.
After more than two weeks of talks in Morocco, representatives from both sides struck a deal but stopped short of inking any agreement so far in a sign some differences may still need to be resolved.
No date has yet been named for when the vote may take place.
"The members... have agreed the laws for presidential and legislative elections," Jalal Chouehdi, who represents the east-based parliament, told reporters in the southern Moroccan city of Bouznika.
"All that is left is for parliament to ratify" the texts of the accord, added Omar Boulifa, representative for the High State Council (HSC) aligned with the Tripoli-based administration.
Morocco's Foreign Minister Nasser Bourita said the agreements would be signed "in the coming days" by Aguila Saleh, speaker of Libya's east-based parliament, and Khaled al-Mechri who heads the HSC.
Presidential and legislative elections have been repeatedly delayed over issues including their legal basis and the participation of controversial candidates including Haftar.
The talks in Bouznika, the latest attempt by both sides to reach a deal, had been underway since May 22.
In mid-March, UN envoy Abdoulaye Bathily had called on rival administrations to agree terms for elections "by mid-June".