UN envoy Martin Kobler on Monday urged the speedy formation of a Libyan national unity government and said it should be installed in the capital Tripoli, Algerian state media reported.
Kobler said the turmoil that has wracked Libya since the 2011 revolution that toppled dictator Moamer Gaddhafi had created a "political and military vacuum" and helped the spread of the Islamic State group, the APS news agency said.
"We must advance on the political process by installing a government in Tripoli," it quoted Kobler as saying after talks in Algiers with the minister in charge of Maghreb affairs, Abdelkader Messahel.
Libya has had two rival administrations, with the recognised authorities based in the country's far east and a militia-backed authority in Tripoli since the summer of 2014.
In mid-December, a minority of lawmakers from both sides signed a deal to unify the government and said the cabinet should be based in Tripoli.
A national unity government headed by businessman Fayez al-Sarraj and comprising 32 ministers was formed in January but was rejected by the recognised parliament.
The legislature demanded a trimmed line-up and Sarraj has been holding consultations with several key players to press for its creation.
Sarraj, who on Saturday met controversial army chief General Khalifa Haftar who is opposed by the Tripoli-based administration, is expected to announce a new line-up within days.
Delaying the formation of a government plays into the hands of IS, Kobler warned.
Messahel, also quoted by APS, agreed with his assessment.
"We are impatient to see this government installed in Tripoli," he said.
On Sunday, France and the African Union also pressed Libya's divided politicians to agree on a unity government in order to curb the spread of IS which both countries see as a threat.
French Defence Minister Jean-Yves Le Drian said IS could infiltrate the ranks of refugees using Libya as a springboard to reach Europe via Italy some 300 kilometres (185 miles) away.
African Union leaders have also discussed the Libyan turmoil and its repercussions at a summit in Addis Ababa and set up a five-member committee on how they can help push for a solution.
On Friday Algeria, which has hosted several rounds of UN-brokered Libyan peace talks, suspended flights between Algiers and Tripoli for security reasons.