There are two layers to this question, which is popping up on TV screens this weekend. One is the geopolitical layer; the other is the simple-tracing-of-facts layer.
Starting with the latter, Reuters reported in February that Iraq and Iran signed an arms deal in November of 2013, right after Nouri al-Maliki got home from a visit to Washington (during which he petitioned Obama for more arms to fight off the “ISIS” insurgency waging war across Syria and western Iraq).
The ISIS insurgency – “Islamic State of Iraq and al-Sham” – is often rendered “ISIL” in English, for Islamic State of Iraq and the Levant. In either case, the territorial reference is to Iraq, Syria, Lebanon, and Israel. The insurgents are Sunni jihadists, and their principal focus at the moment has been scoped by the Syrian civil war, in which they are fighting the Assad regime. Most of the ISIS guerrillas come from abroad; a major contingent of them is from the Chechen Caucasus, where Islamist insurgents have waged a war against Russian rule for nearly a quarter century now. (For more on all this, see the last link above to my January 2014 post. The map shows the corridor between Syria and Baghdad where the ISIS insurgency has sought to plant roots.)
The bottom line is that ISIS is fighting to gain control of territory over which radical Iran wants control herself. Iraq, under the current government, has no interest in wielding an outsize influence over her neighbors to the west; the priority in Baghdad is reestablishing control over Anbar Province. But the larger aspirations of ISIS clash directly with those of the mullahs in Tehran.
Tehran is still arming Assad and still seeking to arm Hezbollah and Hamas, as evidenced by the attempt in March to ship advanced artillery rockets to one or the other, or both. Besides the shadowy nature of the shipping route, a key feature of that attempt at arming the terrorists was that it combined arms stocks from both Iran and Syria. That aspect of the transaction is informative on multiple levels. At the most general level, it suggests how Iran sees Syria and the overall fight in the region: as an Iranian military and geopolitical campaign.
The mullahs don’t see themselves as narrowly locked in combat with a single opponent (ISIS). They have a much broader strategic objective of maintaining decisive influence where they have had it, and gaining it where they don’t. They want to turn the same territory that ISIS is after into a quiescent client-region. Much of it had fallen to them already, at the onset of the Arab Spring in January 2011: all of Syria, and the southern portion of Lebanon.
The Iranian leaders know they can’t just make abrupt moves against central Lebanon or Israel; their interim goal is to hold sway over vulnerable territories that border Beirut and Israel. And that’s a hydra-headed problem. Under today’s conditions, the Saudis would spearhead an Arab coalition to fight Iran for Lebanon – and for the West Bank, for that matter. Cairo won’t stand by and let Iranian influence build up – or, more accurately, let it change course or take new initiatives – in Gaza. Israel, of course, will defend her territory.
So Iran’s approach to Jerusalem – where the radical clerics quite literally expect to fight under the Mahdi’s banner (see here for more from Ayatollah Khamenei on the 12th Imam) – has to be incremental and cumulative. Defeating the ISIS insurgency is a step along the way to consolidating an unresisting client corridor across the heart of the Middle East.