Libya's internationally recognised leader will meet President Tayyip Erdogan in Turkey on Thursday as the allies seek to lock in recent gains on the battlefield near Tripoli ahead of a new round of talks on a potential ceasefire.
Turkey began providing military support to Fayez al Serraj's Government of National Accord (GNA) in November after signing a military cooperation pact alongside a maritime demarcation deal, which gives Ankara exploration rights in the Mediterranean that Greece and others reject.
In recent months, Turkish support in the conflict has pushed back Khalifa Haftar's eastern-based Libyan National Army (LNA) - backed by the United Arab Emirates, Russia and Egypt - which had been attacking the GNA in Tripoli since April 2019.
The Turkish Presidency said Erdogan and GNA Prime Minister Serraj were due to meet in Ankara at 1100 GMT.
The meeting comes a day after the GNA - supported by Turkey - recaptured Tripoli's main airport ahead of what appeared to be moves towards talks on a truce, after months of gains to oust the LNA from much of its foothold in the northwest.
The GNA said on Thursday it had regained control of Tripoli.
On Monday, the United Nations said both sides had agreed to resume ceasefire talks, warning that weapons and fighters flying into Libya in defiance of an arms embargo threatened a major new escalation.
- How Turkey's Libya foray can backfire, and the Israeli dilemma
- Russia and Turkey risk an ever-bloodier stalemate in Libya
- Who's involved in Libya's war and why
A senior Turkish official said the airport seizure was critical ahead of potential peace talks, and that Turkey would reject any proposal to divide Libya between warring factions.
"Everyone wants to sit at the table without losing territory, but the territory you hold strengthens your positions at the table," the official said, adding Erdogan and Serraj would discuss both strategy and the situation on the ground.
Serraj's visit to Ankara comes after a flurry of diplomacy on Wednesday as leaders from both sides travelled abroad for meetings hosted by the foreign powers embroiled in the conflict. Serraj's deputy and foreign minister travelled to Moscow, while Haftar was in Egypt to meet defence officials.
Ankara, which has sent equipment and military personnel to the help the GNA, has slammed Haftar's supporters for backing a "putschist" and says Serraj's recent advantage is an opportunity for political talks.
Libya has been without central government authority since 2011, with towns and cities controlled by factions fighting for rival governments in the east and west since 2014.
Establishing a lasting presence in Libya would give Ankara another foothold in the eastern Mediterranean, where it has been at odds with neighbouring states over offshore hydrocarbon drilling. Greece and Cyprus called last year's maritime deal with Tripoli illegal, an accusation Ankara has denied.
It would also grant it a strategic position near Egypt, with which ties have been strained for years.
"The whole world recognises that Turkey changed the balance" on the ground, Turkish Foreign Minister Mevlut Cavusoglu said on Wednesday. "We have interests here (and) in the Mediterranean."