The foreign ministers of Algeria and France on Tuesday urged Libya's rival armed factions to seek a political solution in the North African country to help stem the spread of militant groups there and potential spillover across its borders.
Algeria has joined with North African neighbour Tunisia to seek support for an inclusive dialogue in Libya, where competing governments and armed supporters have struggled for control since a 2011 civil war ousted veteran leader Muammar Gaddafi.
France aims to play a bigger role in bringing Libya's factions together to end the turmoil that has allowed Islamist militants to gain a foothold and migrant smugglers to flourish in the absence of a strong central government.
"The main objective remains the fight against terrorism in this area of turbulence, where the presence of terrorists is reinforced because of the chaotic situation in Libya," Algerian Foreign Minister Abdelkader Messahel said after talks with France's Jean-Yves Le Drian, according to state news agency APS.
Le Drian, on a two-day visit to Algiers, described his talks with Messahel as "thorough".
French officials fear Islamic State militants - who were driven from the coastal city of Sirte last year - and other jihadists are trying to exploit the power vacuum in Libya to regroup after losing substantial ground in Syria and Iraq.
A U.N.-backed Libyan government of national accord has sat in Tripoli for more than a year, but it has struggled to reach agreement with eastern factions, including with powerful commander Khalifa Haftar.
Libya's neighbours and regional powers have often differed on how to help. Egypt is closer to Haftar and his anti-Islamist militant campaign while Algeria has pushed for an inclusive approach including using the influence of Tunisia's moderate Islamists.
Last week Le Drian last week held talks with Egypt on how to stabilise Libya and on Monday began a two-day visit to Algiers, where he said he had "thorough" talks with his Algerian counterpart Abdelkader Messahel.
Last year Islamic State was driven out of the Libyan coastal city of Sirte.
"It is this determination which leads us to wish for a political solution in Libya," APS quoted Le Drian as saying.
Algeria and France have agreed to "combine their efforts to reach an inclusive political solution that allows the intergrity of Libyan territory and a peace process", Le Drian added.
Algeria, Tunisia and Egypt last week expressed support for dialogue in Libya and rejected foreign interference or any military options, days after Egyptian jets carried out strikes against militant camps inside Libya.
The talks between Le Drian and Messahel also included the situation in the Sahel, two years after Algeria helped mediate a peace deal in Mali between the government and Tuareg rebels, in part to help stop Islamist militants gaining ground.