
Rival Libyan leader agreed on Tuesday to hold elections on December 10.
The commitment was voiced during a peace conference in Paris aimed at unifying the war-torn north African country.
The Libyan invitees were Prime Minister Fayez al-Sarraj, head of the UN-backed unity government in Tripoli, and 75-year-old military strongman Khalifa Haftar, whose rival Libyan National Army dominates the country's east.
Also present were Aguila Saleh Issa, the parliament speaker based in the eastern city of Tobruk, and Khalid Al-Mishri, the newly-elected head of the High Council of State.
The four men also agreed to "accept the results of elections and ensure appropriate funds and strong security arrangements are in place".
The commitment to holding parliamentary and presidential polls this year came after four hours of talks in Paris where the leaders faced pressure to agree on a political roadmap to end seven years of conflict.
European leaders see stabilizing Libya as key to tackling extremist threats and migration from the fractured country, which has become a departure point for hundreds of thousands of Africans trying to reach Europe.
"I'm optimistic," UN envoy Ghassan Salameh told AFP at the end of the talks which he called "historic" because they had brought together the main Libyan protagonists as well as regional countries for the first time.
"There is no solution other than via you," Tunisian President Beji Caid Essebsi told the Libyan leaders at the opening of the talks. "If things go badly, it's your responsibility."
Instead of signing the deal, the leaders in Paris gave their approval for a joint statement to be issued and later committed verbally to implementing it when explicitly asked to do so by Macron during a group photo.
"So we are all working on this common basis, bravo!" French President Emmanuel Macron told them.
Previous peace agreements have come to nothing.
"It went well. Afterwards, it depends on the implementation," one diplomat told AFP on condition of anonymity.
Representatives from 20 countries including Egypt, Kuwait, Qatar, Russia, Saudi Arabia, Turkey and the United Arab Emirates, attended the talks, as well as Libya's neighbors Algeria and Tunisia.