As Iraq burns and nuclear talks between Iran and the West hurtle towards their 20 July deadline, the US and Iran appear to be pushed together by the force of circumstances.
Neither country wishes to return to the nuclear brinkmanship of the past few years, nor see the jihadist group ISIS carve out a caliphate on Iraq's western flank and Europe's underbelly. But is this enough to produce a "great rapprochement" between the two rivals?
It is true that the US has worked with the Islamic Republic before.
After Iraq's 2010 election, both Tehran and Washington helped Iraqi Prime Minister Nouri Maliki stay in power, even though his coalition had won fewer seats in parliament.
Before that, in 2001, Iran helped the US in its invasion of Afghanistan. It shared intelligence and even took the remarkable step of offering to work under US command in rebuilding the Afghan army. But it will be harder to repeat this co-operation today.
Simply put, a common enemy - ISIS - does not mean a common strategy.
Each side has a different diagnosis of what ails Iraq. Washington increasingly pins the blame on Mr Maliki's sectarian and authoritarian policies, believing that these have pushed Iraq's Sunni minority into the hands of ISIS.
Under the US occupation, al-Qaeda in Iraq - ISIS's forerunner - was rolled back after Sunni tribes were paid and armed by the Americans to turn on the jihadists.
Those Sunni tribes no longer trust the Iraqi government. Washington increasingly doubts that Mr Maliki is capable of bringing about the national unity and reform that it sees as necessary to stabilising Iraq over the longer term, and this is why US President Barack Obama is reluctant to step in with military support.
Iran is also sceptical about Mr Maliki's abilities, but it has no wish to lose a key ally - one who has permitted Iran to use Iraqi airspace to resupply the next-door Assad regime.
Iran also fears that the situation in Iraq is being exploited by Gulf Arab monarchies like Saudi Arabia to reduce Tehran's influence. Iran therefore wants to contain the threat, but without losing influence in Baghdad. It has sent military advisers, but its more important contribution has been to mobilise Iraqi Shia militias, such as Asaib Ahl al-Haq, to fight the Sunni jihadists of ISIS.
Iran has spent more than a decade building up ties to those Iraqi militias, many of whom it had previously deployed to Syria. This dovetails with Mr Maliki's call for volunteers - who will naturally come from Iraq's Shia majority - to fight ISIS in place of his crumbling regular army, but the overall effect is to increase the perception that Iraq's battle lines are drawn along sectarian lines.
As a result, the US fears that publicly involving Iran will heighten the fears of those same Sunni constituencies whose support in defeating ISIS will be crucial. Iran is encouraging the growth of sectarian militias, which decreases the prospect of national unity.
As the former US commander in Iraq General David Petraeus argued this week: "If there is to be [US] support for Iraq, it has to be support for a government of Iraq that is a government of all the people and is representative of, and responsive to, all elements of Iraq. This cannot be the United States being the air force for Shia militias."
The problem is that such militias, with Iran's backing, will increasingly be the spearhead for the fightback against ISIS. American and Iranian strategies are in tension. By contrast, Iran's involvement in Afghanistan in 2001 raised few such concerns about the effect on national sectarian divisions.
In addition, the US will be worried about Iran using this crisis as an opportunity to increase its influence over Mr Maliki and Iraq more generally.
This is a particular concern of US regional allies in the Gulf Co-operation Council (GCC) like Saudi Arabia, who argue that the US-led invasion of Iraq in 2003 effectively handed over the country to Iran.
Riyadh is worried about the threat to the kingdom posed by the growth of ISIS, but it does not want to see ISIS defeated at the cost of an even larger Iranian role in Baghdad.
Saudi Arabia has called for the rejection of "foreign interference" and a "government of national consensus". In other words: deposing Mr Maliki and kicking out Iran. The US does not share this view, but it is sensitive to its allies' concerns. It understands that Saudi Arabia and Qatar could use their own connections to arm and fund Sunni tribes in western Iraq to counter Shia militias, and that this risks inflaming sectarian tensions as much as Iran's policies.
For these reasons, US officials have ruled out "military co-ordination" or even "strategic determinations about Iraq's future over the heads of the Iraqi people".
'Axis of evil'
For their part, Iranian leaders have their own reasons for caution. They bitterly recall that the US accepted Iranian assistance in Afghanistan in 2001, but the very next year included Tehran among countries dubbed the "axis of evil" by President George W Bush.
If Iran were to pressure Mr Maliki to reform or even step down, might Washington - or even Riyadh - use this as an opportunity to roll back Iran's hard-won influence in Iraq?
Moreover, Iran's supreme leader has spent decades excoriating the US as evil and oppressive. Public collaboration would undercut this message. This is why Ali Shamkhani, the head of Iran's Supreme National Security Council (SNSC), has argued that rumours of US-Iran co-operation "are untrue and amount to psychological warfare" and that assistance to Iraq "will be bilateral and will not involve a third country".
For now, US and Iranian co-operation will therefore amount to little more than parallel - but separate - action against ISIS. While the US will continue to make military support conditional on political change, Iran will focus on mobilising Iraq's Shia militias. Without some drastic shift, such the fall of Baghdad, it is hard to see Tehran and Washington bridging these gaps.