How IS conflict has changed Iran nuclear talks
The mid-November deadline to reach a deal on Iran's nuclear programme is fast approaching, and the negotiations between world powers and Tehran have been long and complex.
In some areas there has been progress. In others - like the crucial question of constraining Iran's capacity to move swiftly towards a nuclear bomb - the various parties are still far apart.
When these talks began it looked as though divisions over Iran - its past nuclear activities and future ambitions - threatened a major crisis in the Middle East.
There was talk of potential Israeli military action against Iran in an effort to cripple its nuclear programme. Even the US itself refused to take the military option off the table.
Seeking a negotiated deal was seen as the alternative to potential catastrophe.
And seeking a deal was also in part an essential pre-condition for critical choices in the future. For how could military action be considered without a serious attempt at talks?
Serious talks there have been, though agreement is by no means close.
But the talks themselves have to an extent created a new reality. Tensions have decreased. Some element of mutual suspicion has been dispelled.
But the regional context has also changed the dynamics between Iran and the West.
The Syrian civil war has ostensibly worsened tensions, given that Tehran has been one of the few supporters of the Assad regime as it continues to cling to power in Damascus.
But the new and unexpected crisis prompted by the rise of Islamic State (IS) and its seizure of a significant slice of territory in both Syria and Iraq, has changed calculations.
Iran here has become part of the solution rather than part of the problem. It too is opposed to IS. Iran and the US have a common enemy.
Iran's influence may well have had a hand in the creation of a more inclusive government in Baghdad and its forces have certainly provided assistance to the Iraqi military.
So while Iran remains at loggerheads with the US and its allies on the nuclear front there are powerful immediate reasons for both sides to keep talking.
Thus most experts believe that while a comprehensive nuclear deal is not in sight by mid-November, neither side is likely to want to be the one to walk away from the talks. The most likely outcome is a further extension; an agreement to keep on meeting.
Still far apart
This does not mean a softening of the US position on the nuclear front. There is no quid pro quo here for Iranian support on IS. Indeed the view of the US is that countering IS extremism is as much in Iran's interests as it is for anyone else.
For all the improved atmosphere the US and Iran are still far apart on the central question of its future enrichment capacity.
The US wants Iran significantly to reduce its current holding of centrifuges - the essential machines used in the enrichment process - from around 10,000 today (with many more in stock) to about 1,500.
This level, the Americans insist, is more consistent with Iran's needs for fuel for its civil reactor programme.
The US also wants these restrictions to remain in place for some 20 years.
Iran - for its part - wants to build up its enrichment capacity considerably, bringing more and newer centrifuges online.
With no common ground here the best that can be hoped for is an extension of the talks.
This gives Iran some relief from sanctions while not forcing it to sacrifice its nuclear programme.
The Americans get constraints on Iran's nuclear activities while keeping the sanctions regime largely intact.
As the clock ticks down to the mid-November deadline, more attention will have to be paid to the parameters of any extension.
Does the progress that appears to have been made so far, for example - concessions by the Iranians on the future of the Fordow enrichment facility and the Arak heavy-water reactor - merit some further relief on sanctions?
How far might the terms of any extension be influenced by US congressional pressures or by demands from hardliners in Iran?
How much might continuing concerns about Iran's past nuclear activities influence the debate?
Whatever the interplay of these factors, the smart money is on the talks continuing beyond November in one form or another.
The IS threat and the chaos in the wider region is too great for Iran and the US to stand toe-to-toe on the nuclear issue, at least for now.
And the Israelis too, who have been watching from the wings - whatever they may say in public - may well prefer the constraints of extended negotiations, rather than an immediate crisis if the talks fail.