Istanbul: 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,  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 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.