"This is a good day for the Libyan people," said Stephanie Williams, the acting head of the United Nations mission in Libya.
"The parties have signed a complete countrywide permanent agreement with immediate effect," Williams told reporters in Geneva.
"The parties agreed to the departure of all mercenaries and foreign fighters from Libyan territories, air, land and seas for three months." Military trainers will also leave the country.
"Libya is for Libyans," she went on to say. "And they now want to come together to rebuild their country to end this long state of crisis and division, and to rebuild their institutions."
Williams went on to speak of the importance of the international community in its "support of the Libyan people.
Germany on Friday the ceasefire, calling it a "ray of hope".
The two warring sides signed a "permanent" ceasefire agreement on Friday after five days of talks at the United Nations.
"The ceasefire agreement finally promises a change of course from military to political logic," German Foreign Minister Heiko Maas said in a statement.
"This news is the first ray of hope for the people of Libya in a long time."
Libya has been wracked by conflict since the overthrow and killing of dictator Muammar Gaddafi in 2011, with rival power centres as well as a myriad of militias vying for control.
But there has been increased hope since the two main warring factions separately announced in August that they would cease hostilities, which was followed by a series of UN-backed talks.
Germany, which has sought to play a mediating role in the conflict, brought the rival parties together in Berlin in January, but attempts to impose a ceasefire and arms embargo largely failed for months.
"This is a fundamental step towards peace and stability in Libya," Secretary-General of the United Nations António Guterres added.
"And with the inspiration of the Libyan agreement, now is the time to mobilise all efforts to support the mediations taking place to end the conflicts in Yemen, Afghanistan and in Armenia Azerbaijan, where active hostilities are causing immense suffering for civilians. There is no military solutions for any of these conflicts. The solutions must be political".