A SEDUCTIVE idea is gaining ground among the West’s foreign-policy “realists”—with a bit of boldness America and Iran could end their mutually destructive enmity of the past 35 years and, in so doing, take a giant step towards resolving the conflicts that have brought misery to a large part of the Middle East.

The historic opportunity for this engagement—even its advocates reckon rapprochement is going too far—comes from two developments: the emergence of Islamic State (IS) as a common enemy and the possibility of striking a deal on Iran’s nuclear programme before November 24th, when negotiations are due to end. During his visit to New York last week to address the UN General Assembly, Iran’s president, Hassan Rohani, gave an upbeat view of the nuclear talks, suggesting that just one more heave was needed (a claim lent some credence by Russia’s foreign minister, Sergei Lavrov, who is talking about a deal being 95% done).

Several times Mr Rohani emphasised that, if only a nuclear agreement could be reached, he had “no doubt that the situation between the US and Iran will be completely different”; there were “many potential areas of co-operation in the future”. He also contrasted Iran’s political stability with the chaos in the rest of region. Mr Rohani’s message could not have been clearer: cut us a little slack on the nuclear file and all sorts of other good things will flow from it; we have just two months to seize the chance of a new beginning.

It is true that, compared with a year ago, relations between America and Iran have in some respects greatly improved. After many years virtually without high-level contact, meetings between America’s secretary of state, John Kerry, and Iran’s foreign minister, Mohammad Javad Zarif, have become almost routine and, according to one Western official, they appear to get on. However, it is hard to see how far America and Iran could really co-operate given the deeply embedded competition between them in the region.

Not too close

With a nuclear deal under its belt, might Iran, for example, be prepared to join the American-led coalition against IS rather than snipe at it from the sidelines? That seems unlikely. Although stories of unofficial co-ordination on the ground persist, Iran is conducting what it sees as its own fight against IS by providing weapons and training for Iraq’s Shia militias and continuing to give vital help to the forces of President Bashar Assad in Syria.

There are still plenty of constructive things that Iran could do were it so minded. It holds sway in Baghdad (when it decided to get rid of the disastrously sectarian Iraqi prime minister, Nuri al-Maliki, he duly went) and can probably do more than America to prod the new government of Haider al-Abadi to bring in disgruntled Sunnis and Kurds.

Although there seems little chance of Iran abandoning Mr Assad, its diplomats have occasionally let slip that they may not be quite as wedded to him personally as it appears; Iran could thus play a decisive role in ending the civil war in Syria. Similarly, an Iran that no longer encouraged and enabled its proxies in the region (Hizbullah in Lebanon and Hamas in Gaza) to provoke and threaten Israel really would be seen by the West to have changed. More plausibly, Iran could extend its existing co-operation in Afghanistan, helping to stabilise the country as NATO forces end their combat mission there.

Do Messrs Rohani and Zarif have a vision of Iran being one day welcomed by a grateful America into a new Middle East security architecture that recognises it as an indispensable and respected regional superpower? That seems to be what they are suggesting. It would be a tantalising “grand bargain”, particularly for America which has grown weary of expending blood and treasure in policing the region. Yet much scepticism is in order.

First of all, the linkages that Iran wants to create between the nuclear negotiations with the “P5+1” (America, Russia, China, France, Britain and Germany) and possible co-operation in other spheres would not make a bad deal on the nuclear programme look like a good one. That is a warning Israel’s prime minister, Binyamin Netanyahu, hammered home yet again this week during his trip to America. There is probably no deal that Mr Netanyahu would like, but a wary Congress and America’s Arab allies will not tolerate any backsliding.

Secondly, there is no sign of a breakthrough in the nuclear talks. The upbeat assessment being given by Mr Rohani and Mr Lavrov is not shared by the American negotiators, who are spending more time talking alone with the Iranians. At bottom, there is still no consensus on how far Iran can and should be held back from becoming a nuclear-weapons “threshold” state.

America is sticking to its demand that Iran substantially cut its existing uranium-enrichment capacity to fewer than half of the 9,500 centrifuges it currently deploys (it has a similar number installed but not yet in use); it should not move above that level for up to 20 years. Iran is insisting on no reductions and being allowed to increase its capacity to industrial scale (at least 100,000 centrifuges) in the near future. Mark Fitzpatrick, a non-proliferation expert at the International Institute for Strategic Studies, a think-tank in London, reckons that Messrs Rohani and Zarif might be prepared to make the compromises needed to bring a deal closer, but that the supreme leader, Ayatollah Ali Khamenei, has ruled out any such steps.

Gary Samore, a former White House adviser on arms control, now at Harvard University’s Belfer Centre, believes there is little chance of a comprehensive deal by late-November. But the negotiations might continue under a new interim agreement that would lock in some gains, such as converting the Arak heavy-water reactor to produce less plutonium, in exchange for a little more relief on sanctions.

Mr Rohani may well have overestimated the leverage that the American-led campaign against IS has given him. While he blames (not unreasonably) the rise of the jihadists on America for invading Iraq and the Gulf Arab states for financing and arming them in Syria, the coalition allies blame Iran (also not unreasonably) for allowing IS to flourish by propping up the brutal regime of Mr Assad and backing the Shia-dominated government in Iraq whose corruption and persecution of Sunnis drove them into the arms of IS.

Furthermore, the core of America’s strategy for ultimately destroying IS is to enlist moderate Sunnis against it. In Iraq that means persuading Sunni tribes and Kurds that they have a future in a non-sectarian federal Iraqi state. In Syria it means training and arming the Free Syrian Army (FSA) until it becomes a fighting force able to take on both IS and the Assad regime. It is hard to see how Shia Iran, at least in the short term, can be much help with either; indeed, a partnership with it might make both tasks harder.

My enemy’s enemy is my enemy

Mr Rohani last week accused America of wishing “to train another terrorist group and sending them to Syria to fight”. At some point, the American-led coalition may well find itself carrying out strikes against Mr Assad’s forces and its Shia allies in support of the FSA. The Arab air forces flying alongside are already keener on hitting targets in Syria than Iraq.

Even if such conflicting interests could be reconciled, it is far from certain that Messrs Rohani and Zarif are in a position to bring about any of the things they hint at. The stand-off between Russia and the West over Ukraine has given hope to hardliners in Tehran, among them the Revolutionary Guard, which still wields significant power, that the sanctions regime may fragment even without a nuclear deal. As for Mr Khamenei, there is nothing to suggest that his suspicion of the value of making overtures to the West is softening. If a nuclear deal remains very hard, a grand bargain is harder still.