Reaching a long-sought milestone in a bid to elevate diplomacy over war, Iran and six world powers have agreed on the parameters of a deal that strictly limits Iran's nuclear program in exchange for relief from economic sanctions.

The breakthrough came after marathon talks marked by brinksmanship, threats, and bursts of anger from the exhausted negotiators in cloistered rooms in Lausanne's opulent Beau Rivage hotel.

Yet as details emerged late Thursday of a complex agreement to increase Iran's "breakout time" – the period it would take to acquire enough nuclear material for a single atomic bomb – from the current estimated 2 to 3 months to a year, the relief was palpable and the superlatives flew.

The resulting "framework" deal depends on a complex blend of political decisions and technical wizardry, enabling all sides to claim a degree of victory, or at least that they were not defeated. The most severe restrictions on Iran's uranium enrichment capacity would be imposed for 10 years, with some measures lasting a quarter century and beyond.

But the relief on negotiators' faces masked the knowledge that an enormous amount of detailed work is still required to reach a comprehensive accord by a self-imposed June 30 deadline and overcome political challenges in both the United States and Iran.

"In the end, this success is not final, but it is a substantial achievement," says Ali Vaez, senior Iran analyst for the Brussels-based International Crisis Group. "Finding a mutually acceptable formula on all the seemingly intractable issues on the table was no easy feat."

"This is fragile, but unlike previous agreements in the past 12 years is not a short-term fix," says Mr. Vaez. "Once developed into a fully-fledged agreement, this understanding can put an end to the prolonged nuclear crisis."

In Washington, President Barack Obama hailed a "historic understanding" that will "cut off every pathway that Iran could take to develop a nuclear weapon." The deal, he said, addressing skeptics, "is not based on trust, it's based on unprecedented verification."

Iranian Foreign Minister Mohammad Javad Zarif described a "win-win outcome" for all sides, and Tweeted: "Solutions found."

"We have stopped a cycle [of escalation] that was not in the interest of anybody," said Mr. Zarif. "I hope that at the end of this process, we will all show that through dialogue, and engagement with dignity, we can resolve problems."

US Secretary of State John Kerry, whose final, record-breaking all-night session with Zarif ended at 5:53am Thursday, said gaps remained but that a "solid foundation" had been agreed upon to give "confidence that Iran's nuclear program is and will remain exclusively peaceful."

The key calculation has eluded negotiators for years: Finding a mutually acceptable balance between the numbers and efficiency of Iran's centrifuges – and other components of its nuclear program – and how quickly and reversibly sanctions will be removed. The centrifuges are tall cylindrical machines used in a process called enrichment, in which rotors spin uranium gas at supersonic speeds to harvest the heavier isotopes useful in nuclear reactors or, at higher levels of purity, in nuclear weapons.

So what are the "key parameters" now meant to frame a final deal, and how far have all sides come to get there?

Centrifuges/Enrichment

Iran achieved a primary objective – implicit acceptance it could enrich uranium on its own soil – with the Geneva interim agreement of November 2013. Under that deal, which remains in force, Iran halted its most sensitive nuclear work in exchange for partial relief from sanctions.

But the current compromise is severe for both sides: Iran now has some 10,000 spinning centrifuges out of a total of 19,000 installed, and previously had insisted on keeping them all. For years the US insisted that Iran give them all up, then offered it keep a token 500.

The framework deal settles on 6,104 centrifuges installed, with 5,060 at a single site, Natanz, allowed to enrich uranium. For 10 years, Iran will only be able to use first-generation machines, with 1,000 more efficient second-generation centrifuges mothballed during that time.

A climb-down by both sides requires spin: Zarif states that "we will continue enrichment," while Mr. Kerry describes "dramatic changes" to the "vast majority" of Iran's centrifuges.

Sanctions

Among the thorniest issues addressed this week by Iran and the P5+1 powers – the United States, Russia, Britain, France, Germany, and China – was the speed and pace of relief for Iran from a raft of United Nations, US, and European sanctions on its economy.

Iranian leaders have insisted that all sanctions be lifted "immediately" in any deal.