"There is political legitimacy. That is in the hands of Mr al Serraj. There is military legitimacy - that of commander Haftar. They have decided to act together," Emmanuel Macron says after the leaders reached an accord.
French President Emmanuel Macron who hosted Libya's two main rival leaders on Tuesday hailed what he said was their courage after they reached an accord, including a commitment to a ceasefire and presidential and parliamentary elections.
Libya's Prime Minister Fayez al Serraj and the divided country's eastern armed commander Khalifa Haftar on Tuesday committed to a conditional ceasefire and to elections in 2018 in a joint declaration after talks near Paris. The rival leaders said they would refrain from any use of armed force for any purpose other than counter-terrorism.
Macron said after meetings that ended at a chateau outside Paris that "the courage that is yours today by being here and by agreeing to this joint declaration is historic."
"Civil war is not inevitable"
He said their courage was all about taking risks in a country that has spiralled into chaos since the overthrow and killing of Muammar Gaddafi in 2011.
"I believe profoundly that civil war is not inevitable, and that through dialogue peace can win through, that's what the step taken today is trying to show through concrete actions," Macron said.
"There is political legitimacy. That is in the hands of Mr al Serraj. There is military legitimacy - that of commander Haftar. They have decided to act together. This is a powerful act," Macron told reporters after the two Libyan rivals shook hands, smiling, in front of cameras.
"They have the legitimacy and capacity to gather around them all those who want to be involved in a political process of reconciliation and construction of peace."
The statement was in line with a draft circulated earlier on Tuesday by the French presidency.
Macron has made it a priority of his presidency to play an active role in helping to bring stability to Libya, where the stakes are high for both Europe and Africa.
The oil-producing country has been mired in chaos and fighting since rebels toppled strongman Gaddafi in 2011.