Russia's overt presence in Syria and Lebanon and the security and intelligence agreements it has entered into with those countries have curbed Iran's ability to expand its own footprint in the Levant, security experts in the region said.
Even though the two nations are ostensibly on the same side of the conflict in Syria, Russia's dominance ensures Iran has no room for growth and is not able to reap as large a share of the potential profits as it might hope, they said.
They are currently engaged in an asymmetrical balancing act, which if thrown out of equilibrium could ultimately endanger Iran's national security.
"When comparing Iran's and Russia's entry into the Middle East, especially in Syria and Lebanon, the scales will, of course, ultimately tilt in Russia's favour," said Syrian economist and Damascus University lecturer Mahmoud Mustafa.
Russia's presence and influence come "at the expense of the Iranian interventions, which are transitory", he said, noting that Russian intervention in Syria and Lebanon predates the two countries' independence.
"Russia has been the main supplier of weapons to Syria for decades, and there are many bilateral agreements between the two countries covering all security, military, defence and economic aspects," he said.
Most of these were signed before the outbreak of the Syrian war, he said, though some were inked more recently -- after Moscow's direct intervention in Syria in 2015, "when it sensed that the regime was in danger of falling".
The security and intelligence relationship Russia has with Syria "cannot be compared" to the relationship Syria has with Iran, Mustafa said.
"Taking advantage of historical, religious and political ties, Russia effectively controls the [Syrian regime's] security services and army units, in addition, of course, to a large number of militias," he explained.
This has undermined Iran's plans in several parts of Syria, he said.
Iran "at the very least" aimed to establish a presence in certain areas in order to control the local economy and exploit Syria's natural wealth, according to Mustafa.
By doing that, it has sought to compensate for its losses in Syria and replenish the money it spent from its public treasury to support its regional expansion, especially as it faces a burgeoning economic crisis at home, he said.
Iran has had to face up to the reality of Russian influence in Syria and Lebanon, as well as Russia's attempts to extend its influence into the Gulf region, political analyst Abdul Nabi Bakkar said.
This Russian gamesmanship may further distance Iran from its neighbours in the Gulf, he said, suggesting that this might be why "Iran has proposed to Russia the idea of an Iranian-Russian agreement in the security and intelligence areas".
In mid-July, Iranian ambassador to Moscow Kazem Jalali announced that the text of a 20-year agreement with Russia that covered political, security, military, defence and economic co-operation had been finalised.
He said the agreement was prepared at the behest of Iran's Supreme Leader Ali Khamenei and can be extended for up to 20 years, Iran International reported.
Iran put forward the new agreement after sensing the danger stemming from the hidden conflict with Russia in Syria and Lebanon, "which may put Iranian interests at serious risk", said Bakkar.
Should competition between Russian-allied forces and the Islamic Revolutionary Guard Corps (IRGC) and its proxies lead to direct clashes in Syria, the ripple effect could spread to Iran and even compromise national security, he said.
Soft power in Lebanon
"Although Iran enjoys strong influence in Lebanon owing to the presence of Hizbullah... the Russian influence on the official and governmental levels is stronger, effective and sustainable," said security analyst Jamil Abu Hamdan.
This is unlike the Iranian influence, said Abu Hamdan, a retired Lebanese army officer, describing Iranian influence as "transitory and [which] may end at any time or weaken as a result of international pressures".
Russia has cultivated a close relationship with many of Lebanon's leading political families over past decades, he said, pointing out that it also has ties to the Levant's Orthodox Christian community.
In Lebanon, this influence was cemented after President Michel Aoun took office with the appointment of an advisor for Russian affairs to the Lebanese presidency, he said.
"This is a rare distinction that hasn't happened with any other country, and illustrates the extent of the Russian influence, which reaches the highest political levels in Lebanon," he said.
Russian officials have recently held several meetings with Lebanese officials in Lebanon and abroad with the aim of breaking the political deadlock that has prevented the formation of a new government for months.
Abu Hamdan noted that Russia is also constantly trying to make inroads into Lebanon through military agreements with the Lebanese army.
These agreements have been repeatedly turned down as a result of international political considerations, he added, notably in 2017, when Lebanon allegedly first accepted and then froze a $1 billion Russian arms deal under US pressure.
Lebanon later accepted $5 million in Russian military aid, in 2018, with the funds reportedly going to the Internal Security Forces.
The United States is the biggest donor to the Lebanese army, providing more than $1.5 billion in support since 2006.
Security and intelligence co-operation between Russia and Lebanon has expanded in recent years, Abu Hamdan said, under the guise of repatriating Syrian refugees and monitoring terrorist and other activities.
Russia's soft power activities in Lebanon hint that it views the small Middle Eastern country as an extension of its regional policy towards Syria.