John Kerry talks to Ernest Moniz during a plenary session at the United Nations in Vienna Tuesday. (Carlos Barria/Ap )

John F. Kerry is U.S. secretary of state. Ernest Moniz is U.S. energy secretary.

When President Obama took office, he faced an Iran that had mastered the nuclear fuel cycle, had constructed a covert uranium enrichment facility inside a mountain, was on its way to installing nearly 20,000 centrifuges for uranium enrichment, was developing advanced centrifuges and was building a heavy-water reactor that could produce weapons-grade plutonium. If Iran wanted to develop a nuclear weapon, it was already well down that road and the international community had little insight into its program. Against this backdrop the president vowed never to let Iran obtain a nuclear weapon.

The deal reached in Vienna this month is not only the best way to prevent Iran from having a nuclear weapon, it is the only durable and viable option for achieving this goal. This comprehensive diplomatic resolution has the unified support of the world’s leading powers. It extends the time Iran would need to develop a nuclear weapon, provides strong verification measures that give us ample time to respond if Iran chooses that path, and takes none of our options off the table.

Specifically, the deal blocks each of Iran’s possible pathways to producing fissile material for a nuclear weapon: the highly enriched uranium and the plutonium production pathways, as well as the covert pathway. This deal is based on verification, not trust. Before obtaining significant relief from economic sanctions, Iran must roll back its enrichment, its research-and-development and its stockpile of enriched uranium. To preclude cheating, international inspectors will have unprecedented access to Iran’s declared nuclear facilities, any other sites of concern and its entire nuclear supply chain, from uranium production to centrifuge manufacturing and operation.

If Iran fails to meet its responsibilities, sanctions will snap back into place, and no country can stop that from happening. If Iran tries to break out of the deal altogether, the world will have a longer time period — a year compared with two months — to respond before it could produce a bomb. We also will have the moral authority that comes from exhausting all diplomatic options.

Iran has finally reached a nuclear deal with the U.S. and international partners. Here's what's in the deal, and what happens next. (Gillian Brockell and Julio C. Negron/The Washington Post)

Is this a good deal for the United States and for global security? Consider the facts.

Without this deal, Iran could double its capacity to enrich uranium in a short time. With it, it must reduce that capacity immediately and sharply.

Without this deal, Iran could continue to rapidly develop advanced centrifuges. With it, its program will be significantly constrained.

Without this deal, Iran could expand its existing stockpile of enriched uranium. With it, that stockpile will be reduced by 98 percent, and it will be capped at that level for 15 years. Iran will also be required to get rid of its 20 percent enriched uranium, which is most of the way to bomb material.

Without this deal, Iran could produce enough weapons-grade plutonium each year for one to two nuclear weapons. With it, Iran will not produce any weapons-grade plutonium.

Without this deal, Iran could take the steps necessary to produce a nuclear weapon. With it, Iran is prohibited from pursuing any of these steps.

If the international community suspects that Iran is cheating, the International Atomic Energy Agency (IAEA) can request access to any suspicious location. Much has been made about a possible 24-day delay before inspectors could gain access to suspected undeclared nuclear sites. To be clear, the IAEA can request access to any suspicious location with 24 hours’ notice under the Additional Protocol of the Nonproliferation Treaty, which Iran will implement under this deal. This accord does not change that baseline. In fact, the deal enhances it by creating a new mechanism to ensure that the IAEA gets the required access and sets a firm time limit to resolve access issues within 24 days. This mechanism provides an important tool for ensuring that Iran could not delay indefinitely.

Most important, environmental sampling can detect microscopic traces of nuclear activities even after attempts to remove evidence. Iran’s own history provides a good example. In February 2003, the IAEA requested access to a suspicious facility in Tehran, and negotiations dragged on as Iran tried to remove evidence. But even after six months, tests revealed nuclear activity despite Iran’s attempt tocover it up.

The plan approved in Vienna does not expire — it is indefinite. Some provisions will be in place for 10 years, others for 15, and still others for 20 or 25. But the transparency requirements and Iran’s most fundamental obligation — to preserve the peaceful nature of its nuclear program — are permanent.

Meanwhile, economic sanctions will remain intact until Tehran has met its key commitments, which include removing the core of its reactor at Arak, disconnecting and locking away some 13,000 centrifuges and shipping most of its enriched uranium out of the country.

For the United States to back away from this deal would be a historic mistake. We would be isolated from our partners, face an unraveling sanctions regime and give Iran the unconstrained ability to push ahead with its nuclear program.

We recognize that Iran remains a threat to stability in the Middle East. That danger is precisely why this deal is so necessary and why we fought so hard for the multilateral arms embargo to remain in place for five years and the embargo on ballistic missiles for eight. U.S. sanctions related to terrorism, human rights and missiles will also continue.

A nuclear-armed Iran is a threat to our allies in the Middle East, as well as to the United States and the international community. By taking this threat off the table, this deal makes it far less complicated to address the many other problems that we have with Iran’s regional actions.

President Obama has said clearly that Iran will not get a nuclear weapon. Neither sanctions nor military action can guarantee that outcome. The solution is the comprehensive diplomatic deal reached in Vienna.