BARACK OBAMA came to office with a simple message for his country’s foes: “We will extend a hand if you are willing to unclench your fist.” He has done a lot of handshaking—with Myanmar and with Cuba (see article). Can he now unclench the fist that most threatens the world—that of Iran, which most people believe has for years been trying to develop an atom bomb? The talks with Iran to limit its nuclear programme, in return for a lifting of sanctions, are the most important test of the Obama doctrine that diplomatic engagement, with calculated risks, is better than ostracising enemies.

Only the “parameters” of a nuclear deal were agreed to on April 2nd. Still, it was a potentially ground-breaking moment. If the outline becomes a final agreement, it would offer much greater assurance that Iran will not get the bomb for at least a decade. But two competing dangers loom. On the one hand, Mr Obama’s political foes could seek to destroy even a good deal. On the other, his team could yet fail to secure the safeguards that make the difference between a good agreement and a bad one in the weeks of bargaining to finalise an agreement by the deadline at the end of June.

A credible deal might provide balm to a region now ravaged by civil war. With time, dialogue might help America and Iran overcome the rivalry that has poisoned the Middle East since the Islamic revolution of 1979. It might change Iran’s disruptive behaviour; or perhaps the regime itself. But nobody should count on that. The nuclear agreement must be judged as an arms-control measure: does it make a nuclear Iran less likely? The answer is a provisional yes, at least for a time. It clearly holds enough promise to justify further talks without Congress imposing new sanctions or impeding the president’s right to conduct foreign policy.

A deal would push Iran further from a bomb. The “breakout capability”—the time it needs to make the fissile material for a single device—stood at about two months in 2013, stretched to nearly four months under an interim deal in January 2014 and, under a final accord, would extend to about 12 months, lasting for a decade (a longer duration, say 20 years, would have been better). The inspection system has been tightened and will become much more intrusive. So Iran would find it harder to make a bomb. It would be more likely to be detected if it tried and the world would have more time to respond to violations.

Much work remains before the deal is finalised. The two sides have differences of emphasis and sometimes substance that are unsurprising but nevertheless unsettling. Critical details over the verification and monitoring of Iran’s programme and the consequences for any violations (for instance, how sanctions would be reimposed) have yet to be settled. Yet they will determine the credibility of the agreement. There must be tight limits on Iran’s research and development. Inspectors must be able to gain access to any sites they deem suspicious. And “snapback” provisions to reimpose sanctions should be credible—not vulnerable to endless negotiations.

Spin and substance

Even if these criteria are met, undeniable dangers will remain. After a decade, when this deal begins to lose force, Iran would have the world’s blessing to develop a massive uranium-enrichment programme. It could then produce a bomb’s worth of fissile material in a few weeks. As a signatory of the Nuclear Non-Proliferation Treaty, Iran would still be banned from a bomb and would be subject to enhanced monitoring. Even so, should the regime not change in fundamental ways, the world would have to live with mullahs on the nuclear threshold. There is nothing, in theory, to stop America (or Israel) from taking action if they believe Iran is trying to cross that threshold. But if Iran has kept to the deal in the interim, the world may take more persuading to endorse sanctions and air strikes. Paradoxically, the long-term danger may not be so much Iranian rule-breaking as apparently scrupulous compliance.