On January 7, Russian President Vladimir Putin travelled to Syria for the second time in three years. During his previous trip to Syria in December 2017, Putin landed at Russia's Hmeimim airbase for security reasons.

This time he took the ostensibly riskier step of touching down at Damascus International Airport, which had previously been the target of attacks, including by Israel trying to hit pro-Iran militias.

While back in 2017 Russian media held off on reporting on Putin's trip until after he departed, there was no such delay this time around.

Putin's choice of destination and timing is hardly accidental. It was meant to show that he has nothing to fear when visiting a key regional ally. The gesture is even more poignant considering the recent assassination of Iranian General Qassem Soleimani at Bagdad airport.

The death of the Iranian general could cause more instability in the region, but for Russia, this may mean more opportunities to grow its clout in the Middle East.

Iran's power broker

Soleimani played an important role in Russia-Iran relations. It has been rumoured that he persuaded the Kremlin to intervene in the Syrian war on behalf of Bashar al-Assad's regime during an unofficial visit to Moscow in July 2015.

For most Russian security analysts, however, this version of events seems implausible. It was reported that in June 2015 Moscow's military specialists had already travelled to Syria and identified a location for a Russian military base near Bassel al-Assad International Airport in Latakia. By late July, special forces units were sent to clear land around the airport to establish what would be known as Hmeimim airbase.

In other words, Russia clearly intended to intervene militarily in Syria before that alleged visit.

But while the extent of Soleimani's influence may have been exaggerated, it was by no means negligible. The Kremlin found him to be a reliable partner on whose assistance it could count, especially during the initial stages of its troop deployment to Syria.

Despite its close cooperation with Iran in the Syrian war, Russia did not hesitate to turn a blind eye when Israel started attacking Iranian-backed militias, which Soleimani directed. From Iran's perspective, Russia could have prevented the attacks since it purported to protect Syrian airspace.

The Iranians repeatedly expressed their displeasure at the lack of aerial protection for the positions of the forces it backs in Syria, but, through various channels, Moscow explained that it did not wish to intervene in the conflict between Iran and Israel in Syria and did not want to get involved in the transit of weapons to Lebanon.

And even though Russia deployed an S-300 missile system to Syria following Israel's role in the downing of a Russian plane in September 2018, these attacks continued.

Despite officially maintaining cordial attitudes towards one another, Russia and Iran do not see eye to eye on many aspects of the Syrian conflict. While Moscow has been committed to strengthening Syria's formal security and military institutions, Tehran has been trying to build alternative ones. Soleimani, in particular, had been trying to strengthen the position of Iran-backed militias in Syrian state structures, which had displeased the Russians.

On the ground, there has been persistent tension between Iranian and Russian-backed forces. There have been assassinations in both camps and fierce competition for territory and credit over the fight against ISIL (ISIS). The friction became especially apparent in Deraa province, where rebels accepted reconciliation with the regime under Russian sponsorship. There, Russian forces expelled some units of the Fourth Division, which is known to have close ties to Iran, to maintain its influence over the area.

Meanwhile, Iran has sought to strengthen its grip on the capital, Damascus, by buying land to effectively create a security zone around it. The Islamic Revolutionary Guard Corps (IRGC) has also managed to strengthen its position in Homs province, where the Russian company Stroytransgaz mines phosphates for export.

Soleimani had played a special role in these tensions, often acting outside of his official mandate as IRGC commander. By cultivating relations with pro-Iran militias, the commander sought to grow his clout and secure leverage over regional elites.

New opportunities for Russia

Immediately after the news broke of Soleimani's assassination, both the Russian defence and foreign ministries condemned the act. Yet the Russian presidency refrained from commenting directly on the matter.

It is also telling that photos of a small Russian delegation expressing condolences to Iranian officials at the Iranian embassy in Damascus were published on social media and not on any of the state news agencies.

While Soleimani's death may lead to an escalation of tensions between Iran and the United States and exacerbate instability, for Russia, this may present new opportunities.

Up until his assassination, the Iranian commander acted as a de-facto guarantor of stable relations between the Iranian government and its proxies, including Syrian militias. After his death, it remains to be seen if Iran will be able to maintain the same level of close coordination with these forces or manage their activities in Syria and other countries.

If the Iranian grip over these forces falters, Moscow could exploit it to grow its influence in Damascus. With his Iranian allies scrambling to control the situation after Soleimani's death, Syria's al-Assad may become even more dependent on Russia's support.

Putin's visit to Damascus should be seen in this context - it was intended to demonstrate Russia's dominance in Syria and convey its confidence in its approach to the region.

His decision to use Damascus airport may indicate that Russia is pushing for a greater economic role in Syria. Last year several airlines, including Bahrain's Gulf Air and UAE's Etihad, mulled resuming flights to Damascus.

Russian businessmen have already shown interest in bankrolling the airport's expansion with a new terminal. According to some reports, Russia even asked Israel to cease targeting the airport and in return, it said it might help reduce the volume of Iran's supplies through Damascus, the very supply route that until recently had been overseen by Soleimani's Quds Force.

Yet Russia's economic activities in Syria lag behind Iran in terms of scale and scope. Being engaged in a wide range of sectors - from construction and real estate to manufacturing industries - Tehran has played a major role in the Syrian economy after 2011.

While there are business opportunities for Russian companies, especially as the Assad regime has promised to give them preferential treatment, many are reluctant to engage for fear of Western sanctions and uncertainty over returns on any investment.

So far the main Russian player in Syria is Stroytransgaz, linked to Russian oligarch Gennady Timchenko, which is primarily engaged in developing oil and phosphate deposits.

Soleimani's death also opens the door for Russia in Iraq, which is contemplating expelling American troops from its soil. The measure was supported by some Iraqi parties and the Iranian-backed Popular Mobilisation Forces (PMFs). It is true that the Iraqi parliament's resolution calling on the government to remove US troops lacks legal force. Nevertheless, it is a sign of disruption in the US-Iraq relationship.

In recent years Russia has demonstrated its ability to turn such crises in Iraq into opportunities. In 2017, for example, Russian energy giant Rosneft expanded its operations in Iraqi Kurdistan amid tensions between Erbil and the central government over the independence referendum.

Uncertainty following the Soleimani killing may prompt Iraq to buy Russian anti-defence systems, whether the S-400 system or other models. Bagdad has already shown interest in buying Russia's systems. Talks first started in August last year following Israel's air raids against pro-Iran militias in Iraq.

More recently, PMF Commander Qais al-Khazali suggested Russia and China can replace US military support and advice in Iraq, an offer which will no doubt please the Kremlin.

The bottom line is that Moscow continues to demonstrate its ability to convert Washington's missteps in the region into political and diplomatic gains. Soleimani's assassinations brought tragedy to Iran and its fallout will pose new challenges to the Trump administration. For Russia, however, the Iranian commander's death means a fresh set of opportunities in Syria, Iraq and beyond.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial stance.