When a preliminary agreement to limit Iran's nuclear programme was reached in late 2013 there was no shortage of pessimists who doubted it would be the prelude to a more sweeping pact. This sentiment reflected the extent of the animosity between the West and Tehran, one manifestation of which was President George W. Bush's inclusion of the latter in his "axis of evil". The deal agreed this week by Iran and the permanent members of the UN Security Council plus Germany is, therefore, a triumph of perseverance and diplomacy. In one swoop, the prospect of Tehran developing nuclear weaponry has been largely eliminated and the chance of it playing a more constructive role in world, and especially Middle Eastern, affairs has been much enhanced.
Two figures paved the way for this agreement. The first is President Hassan Rouhani, whose election led to Iran bringing a more moderate mindset to the negotiating table. A new willingness to compromise was evident as Tehran sought to move out of isolation and to rid itself of the crippling sanctions imposed by the US and the European Union. The second figure was his US counterpart. Many world leaders have paid lip service to the perils of not tackling nuclear proliferation, but Barack Obama has made it an actual priority since the start of his presidency. The Iran deal represents a stunning success and is, as he suggested, the catalyst for "a more hopeful world".
Both sides have made compromises. If the agreement is not ideal, Iran was never about to kowtow to the West. It has pledged to reduce its enrichment capacity by two-thirds, but there is not the ready access of International Atomic Energy Agency monitors to its nuclear facilities demanded by some critics because of previous transgressions. The oversight features appear rigorous enough, however, to suggest that Tehran would find it extremely difficult to develop nuclear weapons without being detected. The deal also has provisions that mean economic sanctions will be reimposed if it fails to meet its obligations. Further, an arms embargo will remain for another five years.
Predictably, Israel has railed against the deal. It must voice such wholesale doubts if it wishes to reserve the right to take military action against Iran. Israel will receive backing from many Republicans in Congress, who will seek to ensure the sanctions remain in place.
But Obama can point not only to a breakthrough in nuclear diplomacy but the role Iran can be expected to play in advancing US interests in at least one area of the Middle East.
Iran and the US have been thrown together in the fight against the Islamic State. Originally reluctant allies, they are now better placed to work in tandem. The Iranian-backed Shia militia have, along with the Kurds, been the most effective force against the Islamic State. Their ability to take the fight to the enemy has contrasted strongly with the feebleness of the American-trained Iraqi Army.
Playing a major part in defeating the Islamic State could be Iran's second major contribution to a more stable Middle East.