Turkish President Recep Tayyip Erdogan will host Russian counterpart Vladimir Putin on Wednesday to inaugurate a new gas pipeline, with tensions in Libya and Syria also on the agenda.
Putin arrived late on Tuesday after paying a surprise visit to Syria -- his first to Damascus since the war began -- at a moment of acute uncertainty in the Middle East following the assassination of top Iranian general Qasem Soleimani by the United States.
Russia's leader will seek to boost his credentials as a regional powerbroker at the symbolic opening of the TurkStream pipeline, which brings Russian gas to Turkey and southern Europe via the Black Sea.
TurkStream and the Nord Stream pipelines under the Baltic allow Russia to increase gas supplies to Europe without having to rely on Ukraine.
But Moscow's increasing domination of European energy markets has worried the US, which last month sanctioned firms working on TurkStream and the almost completed Nord Stream 2.
The ceremony in Istanbul, due to start at 1200 GMT, reflects a dramatic improvement in ties between Russia and Turkey -- two countries seemingly on the verge of war less than five years ago after Turkey shot down a Russian jet.
They remain on opposing sides in the Syria conflict and could be on a collision course in Libya.
Last week, Turkey sent its first troops to help defend the UN-backed Tripoli government, which is under siege from strongman Khalifa Haftar.
Erdogan says 2,500 Russian mercenaries are among those supporting Haftar -- claims denied by Moscow.
But Russia so far seems unfazed by the Turkish deployment in Libya, said Mariana Belenkaia, of the Carnegie Centre in Moscow.
"The two countries will likely be tempted to share the Libyan burden," she said.
- Russian demands 'are simple' -
Syria remains a potential powder-keg for Erdogan and Putin's relationship.
Syrian government forces -- backed by Russia -- have ramped up bombardment of the last rebel strongholds in Idlib province in recent weeks, sending hundreds of thousands fleeing towards the Turkish border.
Erdogan has called for a truce in Idlib, following previous temporary halts to the fighting brokered with Russia in late 2018 and updated in August last year.
"Russia's demands are very simple," said Yury Barmin, of the Moscow Policy Group think tank, "Turkey must do more to eliminate terrorist cells in Idlib. The discussions will be around this idea."
Improved ties between the two countries have been facilitated by a number of major energy and defence deals -- Russia is building Turkey's first nuclear plant and provided a missile defence system.
Putin also earned goodwill in Turkey after his quick support for Erdogan following an attempted coup in July 2016.
The two men have developed a "strong personal relationship", according to Jana Jabbour of Sciences Po university in Paris, who adds that "their economic and energy plans are interdependent".
The TurkStream project, which was temporarily halted during a frosty patch in Russia-Turkey relations, includes two parallel pipelines of more than 900 kilometres (550 miles).
The pipeline links Anapa in Russia to Kiyikoy in northwestern Turkey and has already begun deliveries to Bulgaria. It is being extended towards Serbia, Hungary and Austria.