Libya's fragile unity government hosted an international conference Thursday to build support ahead of the war-battered country's landmark December election.
"Your presence is proof that we are on the road to peace," said the head of the interim government, Abdulhamid Dbeibah, promising that the vote would be held "on time" and urging "respect for the results".
Libya and the UN have been striving to move past the violence that has wracked the North African nation since a 2011 NATO-backed uprising toppled and killed dictator Moamer Kadhafi.
A ceasefire between eastern and western factions last year led to the unity government taking office in March with a mandate to take the country to elections.
"Tripoli has recovered. It is the capital of all Libyans," Dbeibah said at the Libya Stabilisation Conference, the first of its kind to be held in the country for years, with representatives from about 30 nations attending.
The presidential vote is set to take place on December 24, but legislative polls may be delayed, amid wrangling between factions in the country's east and west.
Libyan Foreign Minister Najla al-Mangoush, in a final statement, said Tripoli pledged to respect United Nations resolutions to "create a conducive environment" for the holding of "transparent and inclusive" elections.
Foreign powers have backed various sides in Libya's complex war, and the presence of mercenaries and foreign troops in the oil-rich nation is one of the toughest obstacles to a lasting peace.
Foreign fighters were a major focus of the conference.
Mangoush repeated Tripoli's "rejection of foreign interference" and the "attempts to sow chaos in Libya".
The UN Under-Secretary-General for Political Affairs, Rosemary DiCarlo, insisted on the importance of the December elections to "complete the transitional phase".
She called on international organisations to send "special envoys to observe this operation" and to guarantee its transparency.
As Libya faces multiple accusations of mistreatment of illegal migrants, DiCarlo urged authorities to speed up the repatriation of refugees stranded there and to release migrants in detention.
Foreign powers have been pushing hard for elections to be held as scheduled, after the date was agreed at UN-led talks last year.
French Foreign Minister Jean-Yves Le Drian said that the holding of both presidential and legislative elections on December 24 was "within reach". He praised "remarkable progress" made in both politics and security.
"The aspirations of Libyans for sovereignty converge with the security interests of the entire region, from the Sahel to Europe to North Africa," Le Drian said.
"With our support, Libyans can seize the historic opportunity that exists today to regain peace," he added.
Although there are sharp disagreements over the vote, Libya expert Emadeddin Badi said the conference aims to "capitalise on the momentum to see Libya stabilised, because several countries do actually want to see a stable Libya, even if on their own terms".
Mangoush labelled foreign fighters "a threat not just to Libya but to the entire region".
Last December, the UN estimated that 20,000 combatants from abroad were present in the country.
They include Russians sent by the shadowy Kremlin-linked Wagner group, African and Syrian mercenaries and Turkish soldiers deployed under a deal with a previous unity government at the height of the last round of east-west fighting.
The minimal progress since a January deadline for their departure under a ceasefire deal reflects the complexity of the issue.
Earlier this month, a joint commission of eastern and western military commanders agreed on a roadmap for their departure -- but it lacked a timeline.
Tripoli has said a "very modest" number of fighters have left.
Also on the list of Libya's woes is the question of integrating and unifying the country's armed forces under a single command -- forces that as recently as last year were firing at each other.
While in theory the country has a unity government, its east is largely controlled by military strongman Khalifa Haftar, widely expected to stand as a presidential candidate but despised by many in Libya's west.