Russian President Vladimir Putin met Syria's Bashar al-Assad Tuesday during a surprise visit to Damascus as the prospect of war between Iran and the United States loomed over the region.

In one of the highest-profile assassinations in the troubled Middle East's recent history, Washington killed top Iranian commander Qassem Soleimani Friday, triggering vows of bloody revenge from Tehran and its allies.

On his first visit to the capital since the start of the Syrian conflict nearly nine years ago, Putin greeted the Russian forces stationed there on the occasion of the Orthodox Christmas.

Russia's 2015 military intervention was decisive in saving Assad's regime and Putin hailed the latest advances made by Syrian government forces during his visit.

"In his conversation with Assad, Putin noted that we can now say with confidence that a huge distance has been travelled towards restoring Syrian statehood and the country's territorial integrity," Russian news agencies quoted Kremlin spokesman Dmitry Peskov as saying.

Government and allied forces barely controlled a fifth of the country before Moscow stepped in but have now clawed back most of the territory lost at the beginning of the war.

Russia has thousands of forces deployed across Syria in support of the army, while an unknown number of Russian private security personnel also operate on the ground.

Putin met Assad on his first visit to Damascus since the start of the nearly nine-year-old war
Putin met Assad on his first visit to Damascus since the start of the nearly nine-year-old war Syrian Presidency Telegram Page / -

In December 2017, Putin visited Hmeimim, the Mediterranean base where the largest number of Russian forces is deployed, but had not visited Damascus since the start of the conflict in 2011.

The Russian strongman is next expected in Turkey, the other key broker in a conflict that has left more than 380,000 people dead and displaced half the country's population.

His visit to the region comes as the United States, whose military dominance in the region has waned while Russia's has grown, touched off what many fear could be a high-stakes cycle of region-wide tit-for-tat violence.

The head of Iran's Islamic Revolutionary Guard Corps foreign operations arm, Qassem Soleimani, was killed on Friday in a US strike on Baghdad international airport.

The head of the Quds Force was widely seen as one of the most powerful men in the region and the architect of Iran's support for the Syrian army.

The two leaders also visited Damascus' historic Ummayad Mosque in the Old City of the Syrian capital
The two leaders also visited Damascus' historic Ummayad Mosque in the Old City of the Syrian capital Syrian Presidency Telegram Page / -

Tehran has reacted by vowing bloody revenge, as have the militias it controls in Iraq, while parliament in Baghdad has voted to request a full US troop withdrawal.

US President Donald Trump, who boasted in a tweet that Soleimani should have been killed earlier, in turn threatened Iran with more strikes and Iraq with sanctions if US forces were targeted or forced to leave.

Putin's reaction to the escalation between Iran and Washington had been laconic, warning only that Soleimani's killing could "seriously aggravate the situation in the region".

The United States still has forces deployed in Syria as part of the coalition against the Islamic State group, some in Kurdish-controlled areas in the northeast and others at a base further south near the Iraqi and Jordanian borders.

Peskov told Interfax, RIA Novosti and TASS that Putin had met Assad at a command post for Russian forces in Syria, driving through Damascus on the way.

"Putin also noted that on the streets of Damascus the signs of how peace has been restored can be seen with the naked eye," Peskov said.

He said the two men had heard military reports on the situation in various parts of Syria.

"The Syrian president expressed appreciation for the help of Russia and the Russian military in the fight against terrorism and the restoration of peaceful life in Syria," Peskov said.

Assad's forces now control more than 70 percent of the country, but several areas remain out of its control.

These include the embattled opposition bastion of Idlib, a northern sliver seized by Turkey last year, and a Kurdish-controlled swath of the northeast.

The Syrian presidency said Assad and Putin discussed stamping out "terrorism" in jihadist-held Idlib, and Turkey's "measures" in the north of the country.

Putin seems not to have been received at the presidential palace, but the two leaders visited the Umayyad mosque, according to photos shared by the presidency.

To mark Christmas, they also visited the centuries-old Mariamite Cathedral in Damascus -- the seat of the Greek Orthodox church in the East -- where the Russian leader presented the gift of an icon of the Virgin Mary, the presidency said.