One of the more unusual byproducts of the advance of ISIS has been the realisation that Iran and the US share an interest in blocking ISIS advances and re-asserting government control over areas seized by the group. It is a classic Middle Eastern 'enemy of my enemy' scenario, which makes for strange bedfellows.
Publicly, President Rouhani seemed to open the door to cooperating with the US in Iraq, but this appeared to be shut again by the Iranian Foreign Ministry's spokesman.
While Tehran and Washington's security interests may converge on this issue, we should not fall into the trap of thinking that this may presage any broader degree of cooperation. The differences between the two countries on Syria and on Iran's broader regional aspirations, as well as the nuclear issue, remain significant.
Even in Iraq, the commonality of their interests are circumscribed. Iran seeks a much greater degree of continued influence in Iraq than does the US. Not only does Tehran have to factor in the possibility of a potential threat from ISIS on its border if Iraqi government control collapses, it also has to contemplate the potential loss of its influence in Syria, even if that prospect looks less likely than it did a year ago.
For that reason, Iran sees itself as Iraq's ultimate security guarantor, either directly through advisory and enabling support or indirectly through proxy militia forces. Iran traditionally likes to work through proxies and advisers in order to minimise its public footprint outside the country. As a Persian Shi'a country, Iran has always understood its 'otherness' in the Arab world (it is much better at this than the US), and acted accordingly.
Iran's actual activities in the country are difficult to verify. Some unsourced media reports talk of 2000 basiji already in Iraq, while others talk of 150 advisors from the Iranian Revolutionary Guard Quds Force, and yet others say that two battalions of Quds Force are in Iraq. Another report claimed that the Quds Force commander Qassim Suleimani and dozens of advisers visited Iraq last week to discuss the crisis and how to stabilise the situation.
Regardless of the support Tehran is providing to Iraq, or that which Washington might offer, we should not conflate their shared interests in defeating the immediate ISIS threat with any broader realignment of interests.