After more than two weeks of wrangling and missed deadlines in Vienna, Iran and its international interlocutors have finally clinched a historic accord over Tehran's nuclear program. The diplomacy with Iran, an endeavor that faced vociferous opposition throughout, was aimed at curbing the Islamic republic's ability to produce a nuclear weapon. A tentative framework was inked in April between Iran and its negotiating partners, which include the United States, Russia, Britain, France, China and Germany.

The deal's proponents argue that the talks have yielded the best guarantee possible that Iran won't be able to move toward nuclear weapons, while also, for the time being, reducing the risk of yet another military escalation in the Middle East.

"This deal offers an opportunity to move in a new direction. We should seize it," President Obama said Tuesday.

Here's a guide to how it works.

Extending the breakout time

The main benchmark by which analysts gauge Iran's ability to produce an atomic bomb is the "breakout" time — the time needed for Iran to produce enough weapons-grade enriched uranium for one nuclear bomb. It is currently estimated at a couple of months; under the terms of the deal, that time frame has been extended to at least one year.

The implication here is key: One year gives world powers enough time to mobilize action to interrupt Iran's pathway to a bomb. The extended breakout time also presents, in its own right, a strategic obstacle to Iran's leadership, raising the stakes if it ever considered rushing toward building a nuclear arsenal. To be sure, Tehran has always insisted that it has no interest in obtaining a nuclear weapon, but its covert activities in the past raised the world's suspicions and led to tough international trade, banking and financial sanctions.

The deal focuses on limiting Iran's ability to produce and maintain the fissile material needed to build nuclear weapons. Along the lines of the April framework agreement, Iran will cut its number of centrifuges — the devices used to enrich uranium gas — from 19,000 to 6,000. Its stockpile of enriched uranium will be reduced from about 10,000 kilograms to 300.

The heavy-water reactor at Arak will be reengineered so that it does not yield material that can be turned into weapons-grade plutonium, and all of its spent fuel is to be shipped out of Iran for the life of the reactor. Iran has committed to not building a similar reactor for the next 15 years.

Uranium enrichment at the underground facility in Fordow — a concern because some outside observers believe it would be difficult to hit with an airstrike — will be strictly curbed. Iran will be prevented from bringing fissile material into the site over the next 15 years; Fordow will lose more than half of its 2,800 centrifuges and be converted into a nuclear physics research center.

Iran and six major powers have reached a landmark deal to curb Tehran's nuclear program. Iran's Foreign Secretary says it represents a new chapter of hope. (Reuters)

Inspections and enforcement

In all these instances, the deal outlines tight guidelines for monitoring and verification by the International Atomic Energy Agency, the U.N. nuclear watchdog. IAEA inspectors will be granted regular access to all these major nuclear sites and will monitor Iran's nuclear infrastructure, from its uranium mills to centrifuge storage facilities, for up to 25 years.

The Israeli newspaper Haaretz unpacks how access will be guaranteed at Iran's most sensitive sites:

According to the agreement, UN inspectors will be able to enter any suspect facility in Iran within a maximum period of 24 days. Iran will be able to present reservations to the IAEA's requests to visit suspicious facilities. In such cases, a special arbitration committee will be established to make a decision. The committee will include representatives of the six world powers, Iran and the European Union. Iran will be in the minority, with only Russia and China holding positions close to Tehran's.

Sanctions

The deal, in the next week to 10 days, will be sent to the U.N. Security Council — Iran's negotiating partners included all five permanent members of the Security Council, plus Germany. There, it will be codified by a new resolution once the IAEA certifies that Iran has stuck to its commitments regarding its enrichment capabilities.

This will lead to the Security Council dropping its wide-reaching sanctions on the Iranian regime, which have crippled the country's economy. If Iran violates any terms of the deal, sanctions could be snapped back within 65 days.

Separately, a U.N. embargo on conventional weapons sales will be lifted within five years, while a ban on missile sales to Iran will be lifted within eight years. In the last few heated days of talks, this particular element of the dispute appeared to be the most intractable, with Russia pushing aggressively for an end to the arms embargo, but it appears both sides have met halfway.

Oil prices have already dropped at the prospect of Iran's huge petroleum industry returning to the fold.

... and how it doesn't work

Critics of the deal, including Israeli Prime Minister Benjamin Netanyahu and Republican hawks in Washington, warn that, contrary to the Obama administration's talking points, it gives Iran a ticket to becoming a nuclear superpower. These claims are somewhat undermined by the many tough provisions within the deal.

For opponents, though, the issue lies less in the technical details and mechanisms negotiated in Vienna and more in Iran's track record in the region. Since 1979, the Islamic republic has been an avowed enemy of the United States and its interests, and has supported proxy militias across the Middle East, including some groups deemed terrorist organizations.

The Obama administration has been clear that the goal of the negotiations was to place ironclad controls on Iran's nuclear program, not fundamentally change the Iranian regime's outlook or policy.

"Tough talk from Washington does not solve problems," Obama said. "Hard-nosed diplomacy, leadership that has united the world's major powers offers a more effective way to verify that Iran is not pursuing a nuclear weapon."