Soviet Union and the Iran–Iraq War

The policy of the Soviet Union towards the Iran–Iraq War of 1980 to 1988 varied, beginning with a stance of "strict neutrality" and moving towards massive military support for Iraq in the final phase of the war. The war was inconvenient for the USSR, which had aimed to ally itself with both Iran and Iraq. In the first period of the war, the Soviets declared a policy of "strict neutrality" towards the two countries, at the same time urging a negotiated peace. Iraq had been an ally for decades and the Soviets now tried to win over Iran as well, but their offers of friendship were rebuffed by the Iranian leadership, whose slogan was "neither East nor West". In 1982, the war turned in Iran's favour and the Iranian leader Ayatollah Khomeini pledged not to stop the conflict until he had overthrown the Iraqi president Saddam Hussein. Such a prospect was unacceptable to the Soviet Union which now resumed arms sales to Iraq while still maintaining an official policy of neutrality. The Soviets also feared losing Saddam's friendship to the West. After further Iranian gains in 1986, the Soviet Union massively increased its military aid to Iraq. The Soviets were now afraid of the Iranians encouraging Islamic revolution in Central Asia. Soviet aid allowed the Iraqis to mount a counteroffensive which brought the war to an end in August, 1988.

Soviet policy towards the Iran–Iraq War
According to Mesbahi, Soviet policy fell into three periods:

"Strict neutrality" (1980–82)
The outbreak of the Iran–Iraq War in September, 1980 provided the Soviets with a quandary since they aimed to be friends with both sides. The 1979 Iranian revolution had overthrown the Shah, the USA's key ally in the Middle East. Iran's new anti-American stance presented the USSR with a golden opportunity to win the country over to the Soviet camp. But the war between Iraq and Iran complicated matters. Iraq had been a very close ally of the Soviets since 1958 and in 1972, the USSR and Iraq had signed a Treaty of Friendship and Cooperation in which both countries promised to help each other under threat and to avoid entering hostile alliances against one another. Iraq, along Syria and PLO, had replaced Egypt as the Soviets' chief ally in the region after Egyptian President Anwar Sadat ordered Soviet military personnel to leave the country in 1972. In 1967, Iraq signed an agreement with the USSR to supply the nation with oil in exchange for large-scale access to Eastern Bloc arms. The Soviets were unhappy with Iraq's offensive against Iran, although they avoided issuing an official condemnation. They were reluctant to supply Iraq with more arms although they allowed their Warsaw Pact allies to continue doing so. At the same time, the USSR attempted to court Iran and offered to sell arms to the Iranians, a bid for friendship which was rejected by Tehran, due to its historic distrust of Russia and the Soviet Union. Nevertheless, the USSR's allies, Libya and Syria, sold weapons to the Iranians, presumably with Soviet permission. The Soviets also worried what Western reaction would be if they opted to back either Iraq or Iran. The complicated balancing act of trying to maintain good relations with both Iran and Iraq led the USSR to observe a policy of "strict neutrality" during the opening phase of the war while calling for a negotiated peace.

The USSR tilts towards Iraq (1982–86)
However, the Iranians rebuffed Soviet offers of friendship and by 1982 they also had the upper hand in the war. They decided to push on into Iraq and overthrow Saddam Hussein. This led to a change in Soviet policy from Summer, 1982. The Soviets did not like the implications of an Iranian victory, fearing Tehran would go on to export Islamic revolution elsewhere in the world. Although officially still neutral, the USSR gradually increased economic and military support to Iraq to stop the collapse of Saddam. The Soviets had a commitment not to let an ally be overthrown and support for Iraq also played well with many Arab nations (the Soviets finally achieved diplomatic relations with Oman and the UAE and an agreement to supply arms to Kuwait). In 1983, the actions of the Iranians became increasingly anti-Soviet. The authorities cracked down on the Moscow-backed Iranian communist party, Tudeh, and then expelled 18 Soviet diplomats. The Soviets were also keen to counterbalance Iraq's increasingly friendly relations with the West by boosting military aid to Saddam. Iraq became "the largest recipient of Soviet-bloc military aid among the countries of the Third World". In 1984, Iraq officially established diplomatic relations with the USA. This, combined with the outbreak of the "tanker war" (Iranian-Saudi confrontation over oil tankers in the Persian Gulf) opened the worrying prospect for the Soviets of an increased US presence in the region. The USSR responded with yet more military aid to Saddam.

Active support for Iraq (1986–88)
In 1986–7, the Soviet Union definitely turned to supporting Iraq. The war had been bogged down in a stalemate until the Iranians had taken the Faw Peninsula. This and other military gains offered the prospect of an Iraqi collapse. This worrying development pushed the conservative Arab rulers closer to the USA, which they saw as their protector. The USSR did not relish the idea of increased American military presence in the area. The Soviets were also worried about what would happen in Afghanistan. They had invaded this neighbour of Iran in 1979 and fought a long war there. Iran had provided support to some of the anti-Soviet Afghan Mujahideen. In March, 1987 the Soviets decided to withdraw their forces from Afghanistan, and they were concerned that the vacuum would be filled by an "Islamic fundamentalist" regime. There was also the prospect of Islamist revolution spreading to Soviet Central Asia. This "Islamic factor" became a major concern for the Soviet leadership during the last phase of the Iran–Iraq War and led them to boost arms supplies to Iraq. "The decision to give Iraq the military edge was universal. Not only the Soviet Union, but the entire Western alliance, largely financed by conservative Arab states, engaged in the most comprehensive and massive arms transfer in history to a Third World state engaged in conflict (...) The 'Western package' for Iraq, however, paled in comparison with the Soviets'. Between 1986 and 1988, the Soviets delivered to Iraq arms valued at roughly $8.8 to $9.2 billion, comprising more than 2,000 tanks (including 800 T-72s), 300 fighter aircraft, almost 300 surface-to-air missiles (mostly Scud Bs) and thousands of pieces of heavy artillery and armored personnel vehicles." The massive increase in weaponry allowed Iraq to regain the initiative in the war. At the same time, the USSR continued to press for a ceasefire and offer itself as a mediator. To this end, the Soviets made several economic concessions to Iran and opposed the US reflagging of ships in the Persian Gulf. However, Iran showed little interest in friendship with the USSR, rejecting the Communist world along with the West. Soviet aid allowed Iraq to begin a renewed offensive against Iran in April, 1988, the success of which led to a ceasefire and the end of the war on August 20 of that year.