In public, a key step along the path to the deal was the dialogue opened up at this year's UN General Assembly between President Rouhani and Western nations, after years of the relationship being dominated by whether Iran is, or is not, seeking to develop nuclear weapons.
And - more than 30 years after the US embassy siege in Tehran - September's fifteen-minute phone conversation between President Obama and Mr Rouhani gave further hope of potential progress towards resolving the nuclear dispute.
But, behind the scenes, it has now been revealed, the US and Iran have been engaged in secret face-to-face talks for months, in Oman and elsewhere. The Associated Press news agency says they were kept hidden even from America's allies and negotiating partners until two months ago.
It was a high-stakes diplomatic gamble. While Israel argues that the deal reached in Geneva is dangerously skewed in favour of Iran, most of Iran's Arab neighbours are clearly uneasy too.
But the public and private diplomacy from here on will clearly need to be just as intense - and is likely to face many more severe tests - if a more comprehensive nuclear agreement is to be achieved, and Iran's relationships in its volatile region and with the rest of the world are to return to normal.
SHOW ALL | HIDE ALL
pursuing; wanting to do something
military operation in which soldiers or police surround a place to stop food and supplies entering, so that the people inside stop fighting and come out
involved in
high-risk
action which may be very successful but with a risk of failing very badly
unfair; unbalanced
uncomfortable; worried
including many details; covering many aspects