Lausanne framework, Iran agreed to substantially scale down its nuclear activities in order to make any attempt to develop nuclear weapons — an aim denied by Tehran — virtually impossible.
In return, painful sanctions that have suffocated the Iranian economy by choking its lifeblood oil exports and its ability to earn foreign currency will be progressively lifted.
But turning the 505-word joint statement drawn up in a Swiss lakeside hotel into a fully-fledged, highly technical document of several dozen pages and around five annexes, has proved hard work.
A US official warned on Monday “there are real and tough issues that remain which have to be resolved”.
Key sticking points include the pace and timing of sanctions relief, the mechanism for their “snapback” and Iran’s future development of newer, faster centrifuges.
Another thorny topic is the role of the International Atomic Energy Agency (IAEA) watchdog, whose chief Yukiya Amano met Kerry on Monday and who has been closely involved in the talks this week.
Under the mooted deal, it will be up to the IAEA, which already keeps close tabs on Iran’s declared nuclear sites with between four and 10 inspectors on the ground on any given day, to verify that Iran really does reduce its capacities.
But the P5+1 powers — the United States, Britain, China, France, Russia and Germany — also want the IAEA to have wider inspection rights to verify any suspicious activity that might indicate work in secret on a nuclear bomb.
This could include the IAEA visiting military bases, something that Iran’s supreme leader Ayatollah Ali Khamenei last week rejected as a “red line”.
A probe into allegations of such activity, before 2003 and possibly since, is stalled but clearing up these claims is a key condition of the six powers for a deal.
“It is important to get all the details right so that there are no ambiguities or weaknesses that can be exploited by critics of an agreement on both sides,” said Arms Control Association expert Kelsey Davenport.
“This is an historic moment — both sides have come too far to walk away without a good deal,” she said.