In a surprising move in late August, Iran allowed the Russian Air Force to fly from the Shahid Nojeh Air Base in central Iran to conduct bombing operations in Syrian territories that, Tehran and Moscow claim, are controlled by terrorists. This was no trivial decision; it runs counter to a foundational principle of revolutionary Iran's foreign policy. Since 1979, Iran has safeguarded its sovereignty through the principle of "No East, No West," a popular motto engraved on the colorful tiles of the entrance to the Foreign Ministry building in Tehran. Accordingly, for 37 years, Iran has not allowed any foreign power access to its military bases. So why now?

The decision is symbolic of the deepening political and military ties between Iran and Russia. The two countries’ collaboration in Syria is in fact the most significant military engagement Iran has had with any foreign country since 1979, and it could complicate Iran’s rapprochement with the West.

That does not mean, however, that the Russian-Iranian relationship is without tensions: heavy doses of mistrust plague both sides. For example, soon after Russia announced that Iran had allowed it access to Shahid Nojeh, a few deputies in Iran’s Majlis denounced the decision as a violation of the constitution, which forbids the establishment of foreign military bases inside Iran. Several regime officials quickly went into damage-control mode. They emphasized that the decision was constitutional because Russia was only temporarily using the base for refueling purposes, and that command of the base has remained in Iranian hands. They insisted that the Supreme National Security Council, the country’s highest authority on foreign affairs, had authorized the decision. And Iran’s defense minister, Hossein Dehghan, who had travelled to Moscow five times in the past two and a half years, declared that Iran had no intention of allowing Russian access to more bases, but added that “if Russia requested, Iran will consider the request.”

For now, the two countries are strategically cooperating, the official line goes, mainly to save Syria from terrorists who are also threatening both homelands. But the reality is much more complex.

​ A still image, taken from video footage and released by Russia's Defence Ministry on August 18, 2016, shows a Russian Sukhoi Su-34 fighter-bomber based at Iran's Hamadan air base dropping off bombs in the Syrian province of Deir ez-Zor. Reuters UNCOMFORTABLE ALLIES

Iranians hold a deeply rooted historical mistrust of Russia. No country has forcefully snatched more territory from Iran in recent centuries. After World War II, the Red Army, unlike British and American troops, refused to leave Iran, and established two short-lived puppet republics in Azerbaijan and Kurdistan provinces. Only thanks to American diplomatic pressure between 1946 and 1947 did the occupying army leave. Iranian mistrust of Russia lingered even after the 1979 Revolution when, much to Moscow’s pleasure, Iran terminated its strategic alliance with the United States. In the 1980s, Iran harshly criticized the Soviet Union for invading Afghanistan and supporting Iraq during the Iraq-Iran war.

Still, Iran embraced Moscow as a counterforce to the United States, which Tehran saw as the greater threat. Ayatollah Ruhollah Khomeini, the founder of the Islamic Republic, wrote an open letter to Mikhail Gorbachev in January 1989. In it, he declared that Iran will be a good neighbor to the Soviet Union and warned that communism would collapse. A few months later, the two countries signed a few agreements for increasing their commercial, cultural, and technical cooperation. The ink on those agreements was hardly dry when the Soviet Union collapsed, but decent bilateral relations endured.

After 1991, the West devised different strategies, including the expansion of NATO, to contain Russia. Russian President Vladimir Putin, meanwhile, has never stopped trying to remake Russia into a global power. A necessary step is Russia's reentry into the Middle East. But Moscow's options are limited. Syria is a friend, but Syrian President Bashar al-Assad is embattled in a devastating civil war. Other Arab countries are struggling with their own internal difficulties (Egypt, Iraq, Libya, and Yemen), or are too close to Washington (Israel and Saudi Arabia).

Russia understands that, if Iran were given the choice between it and the West, it would surely choose the West.

But Iran is neither. And just as Peter the Great dreamed of using the territory to access to the warm waters of the Persian Gulf and beyond, his successors now see Iran as a safe bridge for reentering the Middle East.

Tehran has, of course, read Moscow’s hand. But Iran has its own reasons for going along with Russia. For one thing, the country remains a powerful counterforce against the United States. Tehran, like Moscow, desires a multipolar world in which Washington does not have the final say. Moscow can also provide conventional weapons to Iran and is uninterested in regime change or pushing for human rights.

Iran, however, remains suspicious of Russia, and for good reason. It is widely recognized that, although Moscow shares some common goals with Tehran, it often uses Iran as a bargaining chip in its dealings with the United States. Memories of the secret deal that U.S. Vice President Al Gore struck with Russian Prime Minister Viktor Chernomyrdin in 1995 are still fresh. The agreement called for ending Russia's sale of conventional weapons to Iran by 1999 in return for a U.S. pledge not to impose penalties on Russia under a 1992 U.S. law that required sanctions against those selling weapons to Iran. Although Russian sales continued, the secrecy of the deal increased Tehran’s suspicions about Russia’s reliability.

Tehran likewise cannot forget that Russia did not exercise its veto power when, starting in 2006, the United Nations imposed crippling sanctions on Iran for its nuclear program. More recently, Iran has been aggrieved by Russia’s failure to send Iran some promised S-300 long-range surface-to-air missile systems. In 2007, Moscow agreed to sell the system, which Iran needed to protect its nuclear facilities, to Tehran. But Moscow, pressured by Washington and Jerusalem, refused to ship the weapons. Iran subsequently filed a lawsuit against Russia at the Geneva Arbitration Court. In 2016, Russia finally agreed to deliver the system but only after the signing of the Iranian nuclear deal, which substantially diminished the possibility of any military strike against Iran.

Russia, for its part, understands that, if Iran were given the choice between it and the West, it would surely choose the West because of Iranians’ historical mistrust of Russia and the knowledge that Russia can provide neither the advanced technology nor the investment capital that Iran desperately needs for its modernization programs. Russia has therefore striven to keep tensions between Washington and Tehran high enough to prevent normalization of ties but not high enough to lead to war or serious confrontation.

The two countries’ relations are further complicated by the ongoing struggle in Iran over the direction of its foreign policy in the post-nuclear deal era. Moderate elements that seek a rapprochement with the West desire to have friendly but not too extensive relations with Moscow. On the other hand, hardliners who oppose rapprochement with the West look favorably on ever-closer relations with Moscow.

Despite these inherent tensions, the political alliance between Iran and Russia is likely to endure for some years to come. Shortly after the landmark nuclear deal between Iran and six global powers, Putin met with Iranian Supreme Leader Ali Khamenei in Tehran in January 2016 and gave him a rare and old copy of the Koran. The two countries have pledged to substantially deepen their economic and military ties in the post­–nuclear deal era as the crippling sanctions are being slowly lifted.

All of these trends are coming to a head in Syria.

Russian President Vladimir Putin (L) speaks with his Iranian counterpart Hassan Rouhani during a signing ceremony after the talks in Tehran, Iran, November 23, 2015. Alexei Druzhinin / Reuters POLITICAL DISORDER

The political order that the British and French established in the Middle East after World War I is collapsing. Iran sees the battle over the future of Syria as a decisive factor in the shaping of the new order. Convinced that Washington is unlikely to support Iran’s regional priorities, the country sees cooperation with Russia as an effective way to strengthen its hand in the region.

Iran’s strategic goal in Syria is to protect Assad, and if that becomes too costly, to protect Assadism—that is, the political, military, and intelligence apparatuses that the Assad clan has established in Syria. Damascus has been a safe conduit for Iran to provide weapons and money to Hezbollah in Lebanon, which is Iran’s most valuable strategic asset. Iran’s presence in Syria and Lebanon has given the country strategic depth against Israel, should Israel attack Iran. It has also been a jumping point for Iran to expand its influence throughout the Arab Middle East.

For Tehran, the battle over Syria is also a central part of its regional rivalry with Saudi Arabia, which supports Assad’s opponents. Iraq, Lebanon, Syria, and, to a much lesser extent, Yemen are the battlegrounds in this rivalry. Tehran believes that should Assad fall, Hezbollah in Lebanon and the Shia-dominated government of Iraq will be weakened. In this scenario, Iran will lose much of its power in the Middle East. Saudi Arabia, supported by the United States, could then become a regional hegemon.

And so Iran has invested heavily in treasure, blood, and prestige to save Assad. Iran has helped the Syrian government organize armed militias, sent military advisors to the battlegrounds, and financed the mobilization of thousands of Iraqi and Afghan Shias to fight in Syria. At least a few hundred Iranians have been killed in the civil war.

Russia’s strategic agenda is only partially compatible with Iran’s. At this time, Moscow and Tehran share the goal of supporting Assad and defeating Assad’s opponents. Both countries are determined to fight terrorism in Syria and Iraq and consider the Islamic State (ISIS) and Jabhat al-Nusra, recently renamed Jabhat Fateh al-Sham (Front for the Conquest of Syria/the Levant), as terrorist groups. Both consider most opponents of Assad as terrorists, including American-supported groups.

Russia is hardly interested in Iran’s so-called Axis of Resistance, which stretches from Iran to Iraq, Lebanon, and Syria and essentially consists of Shia forces. Given its ambition to become a great power in the Middle East, it cannot alienate the Sunni countries. Nor is Russia interested in antagonizing Israel. In fact, relations between Israel and Russia are exceptionally friendly. Russian forces in Syria will not take part in any offensive maneuvers against Israel and may, in fact, prevent Hezbollah and Iran from the same.

Tehran, unsure about the policies of the next U.S. administration, is showing that it will hedge its bets by developing closer military and security cooperation with Russia.

Russia, with its global ambitions, is also more likely than Iran to compromise with the United States over Assad and the future of Syria. For example, Russia appears much readier than Iran to accept an alternative to Assad who is acceptable to Saudi Arabia and who addresses the security needs of Israel. But Iran seems to be willing to take a risk with Russia. On the one hand, Tehran has welcomed and encouraged Russian military intervention in Syria, recognizing that without it Assad’s chances of survival would have been rather low. After all, Assad’s opponents are supported by Qatar, Saudi Arabia, Turkey, and the United States. Since the intervention, Assad’s position, much to Tehran’s delight, has improved. On the other hand, Russian military intervention has somewhat diminished Iran’s role in Syria. Dehghan’s recent comment is revealing. He indicates that Iran and Russia have agreed that Syria’s current political system must be protected, as must the country’s territorial integrity, and that "Assad must remain the decision maker." Most importantly, he says that we have an agreement with Russia that "Iran must be informed of any decision about Syria.” In other words, Iran has conceded that its approval is not required for a possible U.S.-Russian compromise.

NO EAST, NO WEST

For Washington, Iran’s decision to grant Russia access to its airbase should be a wake-up call.

The country is sending a clear message about its dogged determination to support Assad. At the same time, Tehran, unsure about the policies of the next U.S. administration, is showing that it will hedge its bets by developing closer military and security cooperation with Russia.

For now, Iranian foreign policy has clearly become more East-oriented than West-oriented. The tilt toward Russia has been tactical. However, if Iran becomes a strategic ally of Russia, it could have profoundly negative repercussions for Washington. Iran and Russia, for example, can form an anti-U.S. bloc in Central Asia and the Caucasus.

To avoid such an outcome, the United States should try to bring Iran closer to its former stance of "No East, No West." To do so, U.S. President Barack Obama would be well advised to lay a foundation for the full implementation of the provisions of the nuclear deal and for improving economic relations between Iran and the United States before he leaves office. Iran has reached tentative agreements with Airbus and Boeing to purchase dozens of airplanes in a $35–45 billion deal, the single largest economic transaction between Iran and the West in over four decades. Despite congressional opposition to this deal, Obama should take measures to ensure that it goes through. This, in turn, could begin reintegration of Iran into the world economy, improve economic ties between Iran and the West, and strengthen the hands of those moderate elements in Iran that desire to have a balanced—or at least neutral—foreign policy.