OPTIMISM, in the intricate and frustrating world of international wrangling about Iran's nuclear programme, is a relative concept. But the White House did call the opening of talks between Iran and the “5+1 group” (the five permanent members of the UN Security Council and Germany) in Istanbul four weeks ago a “positive first step”. After several months in which a pre-emptive military strike by Israel on Iran's nuclear facilities seemed to be becoming more likely, hopes of a diplomatic solution have now risen. Attention is switching to Baghdad where, on May 23rd, the work on a deal will begin in earnest. Iran's return to the table in an apparently more constructive mood marks a sharp change. The latest round of talks failed in January 2011, after Iran's chief negotiator, Saeed Jalili, set preconditions that other countries found unacceptable. But since the end of 2011 pressure on the regime in Tehran has increased. The UN's nuclear watchdog, the International Atomic Energy Agency (IAEA), published a damning report detailing its concerns over the “possible military dimensions” of Iran's nuclear programme. International sanctions have bitten hard—creating a “world of hurt” in President Barack Obama's words. America now penalises any foreign financial institutions doing business with Iran's central bank, the country's main conduit for oil money, and the European Union has imposed an embargo on Iranian oil, due to come into full effect by July. The last time Iran seemed interested in co-operating was in 2003, shortly after the invasion of Iraq. George Bush had named Iran as part of the “axis of evil” (which also contained Iraq and North Korea). Fearing that it could suffer Iraq's fate, Iran signed the Additional Protocol of the Nuclear Non-Proliferation Treaty, which gives IAEA inspectors souped-up rights of access. Two years later, when things were going badly wrong for America in Iraq and Iran believed the threat of an invasion had passed, it reneged on those commitments.

But responding to pressure is not the same as genuine willingness to do a deal. Optimists think the restarted talks could persuade Iran to take a new course and defuse a hugely dangerous crisis. But sceptics believe that the regime is playing for time, growing ever closer to the point where it can produce a small arsenal of nuclear weapons. Doomsters contend that it is all too late anyway: Iran is already so close to the nuclear threshold that the main effort should now be to dissuade potential nuclear rivals, such as Saudi Arabia and Egypt, from taking the same path.

Three critical factors determine Iran's nuclear capabilities. One is the amount of uranium it has enriched to 19.75% of U-235, which can quickly be converted to highly enriched uranium (HEU)—weapons-grade is usually 85% or more of U-235 but getting there from 19.75% takes relatively little time. Second is the number of gas centrifuges Iran can employ to enrich its stockpile of 3.5% low-enriched uranium (LEU) to 19.75% LEU. Third is how near Iran is to being able to make a warhead small and light enough to fit on a ballistic missile.

On all counts, Iran is now very close to the nuclear threshold. It already has about 6,000kg of 3.5% LEU, enough to produce about five bombs-worth of weapons-grade HEU. Using the four centrifuge cascades at the new Fordow enrichment site, near the holy city of Qom, and 15 additional cascades at the main Natanz site (each has between 164 and 174 centrifuges), it has recently tripled production of 19.75% LEU to about 13kg a month. It may now have a stockpile of 150kg—near to the 185kg needed to produce the 15-20kg of HEU required for a moderately sophisticated implosion device (although about twice that amount of 19.75% LEU would be needed for a first bomb because of initial wastage). Tiptoeing to the door The IAEA's November report also indicated that Iran had probably already tested a sophisticated detonation system for an explosive device suitable for use as a ballistic-missile warhead (albeit the tests are likely to have taken place before 2004, when the weaponisation side of the programme was pursued more energetically than it is today). Informed by the IAEA's work and intelligence sources, estimates of Iran's potential timeline to nuclear weapons—if the country were to quit the NPT and throw everything into its programme—vary between just a couple of months for a single crude device and more than two years for an arsenal of three or four nuclear-tipped, solid-fuelled ballistic missiles. Mark Fitzpatrick, an expert on non-proliferation at London's International Institute for Strategic Studies (IISS), and Greg Jones of the Washington-based Non-proliferation Policy Education Centre (NPEC), differ over the precise timescale—Mr Jones thinks Iran could develop a nuclear missile more quickly—but both concur that Iran already has everything it needs to procure a nuclear weapon. All it lacks is a political green light to go ahead. Mr Obama appears to recognise this. American policy used to be to prevent Iran from gaining a nuclear capability, but in his recent statements the president has talked only about stopping it from getting a nuclear weapon.

That is an important difference between the White House and the Israeli government, which still insists that its “red line” is an Iran capable of making nuclear weapons. In practice, however, Mr Fitzpatrick suggests that Israel has had to bow to reality by declaring a new red line—the “zone of immunity” concept that the Israeli defence minister, Ehud Barak, started referring to last year. This focuses on whether Israel, acting alone, could at least halt or delay Iran's nuclear progress by means of a military strike. Mr Barak worries that Iran will reach that point this year, by rapidly installing cascades of centrifuges at Fordow—which is constructed underneath 80 metres of mountain rock that may be impregnable to conventional bombing.

A substantial part of Israel's defence and security establishment, including the chief of the Israel Defence Forces, Lieut-General Benny Gantz, is unconvinced by Mr Barak's immunity theory. In an interview last month with Haaretz, an Israeli newspaper, General Gantz risked the censure of his boss saying: “Clearly, the more the Iranians progress the worse the situation is. This is a critical year but not necessarily ‘go, no-go'. We're in a period when something must happen…” However, General Gantz added: “Either Iran takes its nuclear programme to a civilian footing only, or the world—perhaps we too—will have to do something. We're closer to the end of discussions than the middle.”

To the dismay of Binyamin Netanyahu, Israel's prime minister, of Mitt Romney, the Republican rival for the presidency, and of many members of Congress, Mr Obama may be preparing to shift another red line. That is whether there are any circumstances at all in which Iran may continue enriching uranium. It has said nothing in public, but the administration's new thinking is a deal with Iran will have to allow some enrichment to continue. Iran claims it has a right to do this under the terms of the NPP, which it does, if it fully complies with the IAEA's safeguards. Given unrestricted inspection and oversight, Iran might therefore be permitted to enrich up to 5% LEU, the cut-off for most civil uses.

Twin tracks, single goal

But Mr Fitzpatrick cautions that this should be seen as a conceivable end point to a successful negotiation rather than as part of an opening offer. Iran is far from meeting IAEA safeguards, let alone the strengthening measures covered by the Additional Protocol. Given its history, satisfying these would be a minimum requirement. Henry Sokolski, the director of NPEC and a critic of the IAEA's safeguards, thinks such a deal is not worth having. Allowing enrichment would leave Iran's nuclear capability intact and create a dangerous precedent for other aspirant nuclear weapons states. Better, he says, to concentrate on preventing a nuclear arms race across the region before it starts, while containing Iran by making it clear that it will suffer devastating consequences if it takes the next step towards acquiring nuclear weapons.

Despite Mr Sokolski's scepticism, for the time being at least Western policy towards Iran has two elements. One is to continue raising the difficulty and cost to Tehran of crossing the nuclear threshold. The other is to offer Iran a way out of today's impasse. But getting the right mix of sticks and carrots will be tricky. The first objective of the P5+1 negotiators, led by the EU's foreign policy chief, Catherine Ashton, will be to find a convincing way to prevent Iran from suddenly sprinting to make nuclear weapons were it to decide on doing so. (Mr Fitzpatrick reckons that any attempted breakout would be spotted by Western intelligence agencies and nuclear inspectors at an early stage. An enrichment facility may exist that they know nothing about—both Natanz and Fordow were “discovered” well before they became operational—but he thinks that is unlikely.)

The best way to ease those immediate fears would be to halt Iran's accumulation of 19.75% LEU. Mr Jalili and his team might agree to a temporary suspension in return for some immediate relief on sanctions, say an EU promise to suspend the oil embargo. That is unlikely. The embargo was agreed on by all EU member countries; it cannot just be turned on or off. Any premature relaxation of sanctions also risks alleviating the pressure on other importers of Iranian oil, such as India, Japan, South Korea and China, to find other suppliers. So the squeeze on Iran will not slacken in exchange for interim concessions—either through easing sanctions or by scaling back the Western efforts to delay its nuclear programme. These have included attacking centrifuges at Natanz with the Stuxnet computer worm in 2009, sabotaging imported equipment and disrupting supplies of key materials for manufacturing Iran's IR-1 centrifuges.

The most the P5+1 will initially offer is a “freeze for a freeze”—a promise not to seek a new round of UN Security Council Sanctions for a set period (not a huge step given the difficulty of getting Russia and China to come into line) in return for Iran suspending 19.75% LEU enrichment. It could also be possible to provide similarly enriched fuel, perhaps from France, for the Tehran Research Reactor (TRR) and LEU targets for producing medical isotopes in the reactor. Iran has made much in the past of this civil use for its 19.75% LEU, arguing that it is running out of its original imported stock from Argentina (it now has enough to fuel the TRR for over eight years) which it needs for the treatment of cancer patients. That said, the EU and America would almost certainly want to insist on additional confidence-building measures from Iran.

In 2009 Mr Obama offered to provide Iran with tested and certified fuel for the TRR if Iran would send to a third country (probably Turkey) 75% of the LEU it had processed to date, to be converted to nuclear fuel. The proposal was initially accepted by Iran's president, Mahmoud Ahmadinejad, before he was overruled by the country's supreme leader, Ayatollah Ali Khamenei, who sees himself as the ultimate guardian of the nuclear programme.

A variation of that deal, perhaps concentrating on sending all Iran's 19.75% LEU overseas, is likely to be back on the table in Baghdad. If Iran shows any interest in taking it, the odds on getting an interim agreement would be greatly shortened. A further priority would be to freeze centrifuge installation at Fordow at today's level of four cascades and halt the production of more advanced centrifuges than the IR-1s now in use.

That would take much of the tension out of the stand-off and pave the way to more far-reaching negotiations aimed at moving Iran gradually from the dangerous aspects of its programme in return for an equally gradual reintegration of the country into the international commerce and politics. David Albright, a former Iraq weapons inspector and founder of the Institute for Science and International Security, has put forward proposals for the essential elements of a long-term settlement, negotiated in stages, through which concessions by Iran would be matched by incentives on the part of the P5+1.

Building on unpublished Russian proposals for such a step-by-step process, Mr Albright suggests there should be five stages towards a framework agreement with Iran. The first would be an updated and verified “freeze for a freeze”. At the second stage, Iran would answer all questions about the military dimension of its programme, agree to implement the Additional Protocol, own up to all its past and current nuclear weaponisation work and verifiably dismantle associated facilities. In return, it would receive “significant” sanctions relief. The third stage would require intensive IAEA inspection and verification of all Iran's nuclear facilities and suspension of any part of its nuclear programme regarded as “sensitive”. Iraq would get provisional suspension of Security Council sanctions. The fourth stage would see IAEA certification of there no longer being any undisclosed nuclear activities and agreement over the parameters of Iran's civil nuclear needs. This would be accompanied by the ending of all American nuclear-related sanctions (some American sanctions are related to human rights abuses, which Congress would be reluctant to lift).

If the talks fail…

Finally, Iran's new-found respectability would be sealed with an invitation to join the Nuclear Suppliers Group (made up of 46 states that have voluntarily agreed to co-ordinate their export controls governing transfers of civilian nuclear material and nuclear-related equipment and technology to non-nuclear-weapon states).

As of now, it is impossible to say whether Iran has any real interest in such a process. In a recent speech Ali Asghar Soltanieh, its ambassador to the IAEA, said that Iran would “never” suspend enrichment (it was not clear whether he was referring to 5% LEU alone or 19.75% as well). Fordow was a “safe place”, and there was no justification for closing it.

There are undoubtedly divisions within the regime between those who think a deal of some kind is possible and those who believe that having already suffered so much for the sake of the nuclear programme, it would be unthinkable at this advanced stage to accept restrictions dictated by America. Some regime elements might actually welcome an Israeli attack because they think it would bind the country together and provide a justification to quit the NPT.

On the other hand, Mr Khamenei repeated in February that possessing nuclear weapons was a “grave sin”, a theological ruling (see article) that provides cover for flexibility. If Iran really has no intention of getting nuclear weapons, it has a respectable way out. Whether Iran's tough and experienced negotiators are authorised to seek it will quickly become apparent. If they are not, Iran will face the certainty of ever-harsher sanctions and the growing possibility of military action.