Although it looks somewhat contradictory on the surface, the avowedly secular Syrian state's support for clericalist Iran during the Iran-Iraq War managed to cover an number of important political bases for Syrian President Hafez al- Assad. Firstly, al-Assad perceived that the Iranian Revolution and subsequent regime change would allow a government more amenable to territorial revision to come to power in Tehran. The Allies in World War One had attached the Sanjak of Alexandretta / Hatay Province to Turkey and this was a perennial source of tensions between Syria and Turkey. Iran's border with Turkey allowed it to put pressure on Turkey and al-Assad gambled that he could use Iranian pressure as leverage against Turkey. Additionally, friendly relations with the Shi'a Iranian regime gave Syria an inside advantage with the Lebanese Shiite communities, which in turn gave Assad a free hand to suppress other militias in Syria, which he demonstrated against the Muslim Brotherhood in Hama.
But beyond these internal and geopolitical benefits of improved Syrian-Iranian relations, supporting Iran had the benefit of hurting al-Assad's chief rival, Iraq's Saddam Hussein. The Iraqi dictator's rise to power injected a noticeable chill between the two Ba'athist states as neither leader was willing to cede to the other the title of the leader of the Ba'athist movement. Mutual distrust scuppered plans for a union between Syria and Iraq and Saddam claimed that Syrian agents were behind an assassination plot and the two countries had no formal diplomatic relationship. Sadaam's invasion of Iran thus represented both an opportunity and a danger for al-Assad. Had Iraq succeeded and achieved a territorial revision and installed a new puppet regime in Tehran, it would have been an enormous stroke against Assad's prestige and power in the Middle East. However, Saddam's recklessness in launching the invasion had initially isolated Iraq from the two superpowers, especially the Soviets who saw an invasion of Iran as most inopportune. The period of Soviet estrangement with Iraq allowed Syria to step into Saddam's place. The Kremlin saw Iraq's invasion as a chance to gain a favorable position inside Iran and would use Syria as an intermediary to provide Iran military equipment. Even after Iraqi-Soviet relations began to thaw as the war turned to stalemate and Saddam backpedaled on his anti-Soviet rhetoric, al-Assad found his position with the Soviets stronger as he was the only ally in the region that had not pursued a policy contrary to Moscow's agenda and the danger that the more interventionist Reagan administration would minimize Syria's strength was a real fear for Soviet policymakers.
Finally, the Syrians did receive material benefits from a closer relationship between Iran during the war. Iranian oil allowed the Syrian economy to keep afloat and the Syrians expected weapons deliveries and other goods to be paid for in hard currency. The Syrians received one million tons of free oil in a 1983 trade deal with Iran and managed to extract further concessions from the Iranians.
In hindsight though, these multiple gambles by al-Assad did not pay off as handsomely as likely had hoped. The Iranian-Syrian relationship proved to be a liability for Syrian-Soviet relations as Tehran refused to back down from its anti-Soviet rhetoric and suppression of the Iranian Communist Party, Tudeh, continued. Gorbachev's new turn in Soviet middle east policy which emphasized a diplomatic rapprochement with Israel meant that the type of hardline approach to politics which al-Assad had pioneered had less traction in Moscow. While the Soviets continued to supply the Syrian state with weapons and other support, Gorbachev was unwilling to arm Syria to achieve strategic parity with Israel. The 1987 Soviet aid package, which came with support for a hydroelectric plant and advanced weaponry like the MiG-29, also had strings attached to it in which Syria would publicly support a Soviet-brokered international conference on the Israeli-Palestinian issue. Additionally, the Soviets also used aid to encourage secret rapprochements between Iraq and Syria. Saddam's mismanagement of the war had led to the Gulf states increasingly bankrolling the Iraqi state's war effort, which further isolated Syria, which was the diplomatic champion of Iran in the Middle East. While this allowed Syria to gain diplomatic inroads among some of the non-OPEC Arab states that feared Iraq, such allies could not lead al-Assad out of the geopolitical box Syria had found itself. Despite Iranian oil and weapon's sales, the Syrian economy was on a precarious ledge and entered into a serious crisis in 1987 in which it defaulted on World Bank loans and domestic inflation had reached 125 percent according to contemporary Western business reports. Moreover, Syrian success pushing Iran's cause was a source of estrangement between Damascus and Tehran as the latter saw al-Assad as trying to use Iranian blood and treasure as a means to enhance his own geostrategic interests. Although Syrian support during the war proved the basis for a longer term Syrian-Iranian relationship in the postwar period, the relationship was often quite functional and based upon overlapping geostrategic concerns rather than shared ideological imperatives.
Sources
Goodarzi, Jubin M. Syria and Iran Diplomatic Alliance and Power Politics in the Middle East. London: I.B. Tauris & Co, 2009.
Razoux, Pierre, and Nicholas Elliott. The Iran-Iraq War. Cambridge, Harvard University Press, 2015.