UN Secretary General Ban Ki-moon, on a surprise visit to the Libyan capital, called Saturday for all sides in the conflict-plagued country to stop fighting.
Ban was to meet members of political parties to support talks aimed at ending a split that has destabilised the oil-rich nation, which has been mired in turmoil since an uprising three years ago toppled longtime leader Moamer Kadhafi.
"Let me be clear: if violent confrontations do not cease immediately, if sustainable peace is not restored, prosperity and a better life will be a distant dream," Ban said, according to an official transcript of his remarks.
He called on "all groups to stop fighting", referring specifically to forces loyal to retired general Khalifa Haftar and the Islamist Ansar al-Sharia militia group that he has been battling in the eastern city of Benghazi since May.
Ban also called for political dialogue to bolster the legitimacy of the parliament elected on June 25.
The international community recognises the new parliament, but the militia groups controlling most of the capital Tripoli and Islamists who hold much of Benghazi dispute its legitimacy.
The majority faction in the legislature has been meeting in the far eastern town of Tobruk near the border with Egypt.
Ban urged the formation of a national unity cabinet, stressing the importance of "a strong government able to implement decisions" in the country, where militias control swathes of territory.
"There is no alternative to dialogue," Ban said ahead of the meeting of rival MPs, also attended by the incoming EU foreign policy chief, Italian Foreign Minister Federica, as well as envoys from Britain, France and Malta.
The UN mission chief in Libya, Bernardino Leon, managed to bring the rival factions together for talks in the remote oasis town of Ghadames on September 29.
At the time, he hailed their discussions as "very constructive and very positive".