Sandwiched in the middle of the world’s most volatile and oil-rich region, Iraq is racing to rearm itself as the Middle East goes on a weapon-buying spree. After agreeing to buy $12 billion worth of American weapons including a large fleet of F-16 fighter jets from Lockheed Martin (NYSE: LMT),  the government of Prime Minister Nouri al-Maliki has decided to diversify its suppliers with another mega-order, worth $4.2 billion, but from Russia.

A joint statement issued on Tuesday after talks between al-Maliki and Russian counterpart Dmitry Medvedev in Moscow, said the deal included 30 Mi-28 attack helicopters and 42 Pantsir-S1 surface-to-air missile systems.

According to RIA Novosti, a state-controlled Russian news agency, the contract is for 50 Pantsir systems, not 42 – but regardless of that number, it is Russia’s largest arms deal since 2009 and is a huge victory for Russia on the international weapons market, according to the Center for Analysis of Strategy and Technologies, a Moscow-based think tank. The deal may be expanded to include MiG-29 fighter-bombers and other heavy weaponry.  

It’s a significant deal not only because of its size, but because it gives Iraq advanced capabilities it could use in the possible conflicts brewing in the region. The Mi-28 helicopter gunships would be deadly in any confrontation with Kurdish independence fighters over the status of Iraqi Kurdistan and its rich oil fields; the Pantsir missiles would be a strong deterrent against the air forces of Iraq’s Sunni Muslim neighbors and potential enemies. That’s an important factor now that Iraq has a Shiite-dominated government, and that those Sunni neighbors -- Saudi Arabia, the United Arab Emirates, Qatar, Kuwait -- all have powerful air forces, recently replenished with hundreds of American and European fighter-bombers of the latest generation.

The joint Russo-Iraqi statement said the deals were initially discussed as early as April and revisited again in July and August during visits to Russia by Iraqi delegations.  

RIA Novosti also quoted arms industry analyst Ruslan Pukhov of the CAST think tank as saying that Iraq’s government “is starting to conduct itself more independently of Washington, and more looking toward Iran." Which is, of course, the other major Shiite Muslim nation, and has shown a growing proximity with the al-Maliki government in Baghdad.    

During the Cold War, Iraq was a a reliable client of the Soviet defense establishment. From 1973 to 2002, according to data compiled by the Stockholm International Peace Research Institute, it bought most of its arms from Moscow, spending 25 billion dollars in constant 1990 money, or 57 percent of its entire arms-importing expenses. 1990 being a relevant year because that’s when most arms sales to Baghdad stopped as Saddam Hussein’s regime invaded Kuwait, leading to international sanctions that would be lifted only after the 2003 invasion, when the United States toppled the Iraqi dictator.

The U.S. during that time sold Saddam less than half of one percent, by value, of the weapons he imported, for a total of just 200 million dollars. Other Western nations sold him far more, largely on the premise that the secular regime in Baghdad was fighting a war (from 1980 to 1988) against the far more unsavory theocratic revolutionary government in Iran, and therefore had to be helped defeat a common enemy.

That war ended in a stalemate, but not before France, for example, had become Saddam’s second-biggest arms supplier, with $5.5 billion worth of sales, including a batch of Mirage F1 fighter jets that could reach twice the speed of sound.

In one of the bitter ironies that the Middle East has historically visited on well-meaning Western powers, those Mirages are now fighting for, of all nations, the Islamic Republic of Iran. Iraqi pilots fled there in 1991 to escape destruction by the Americans, and Tehran kept their planes as war reparations.