The Iran nuclear deal has only one big surprise: it is consistent with the April 2 “parameters”  that preceded it and contains no surprises. No one caved. Nothing got walked back.

But there are some interesting additions. One is this: “Iran reaffirms that under no circumstances will Iran ever seek, develop or acquire any nuclear weapons.” This is a written confirmation of the Supreme Leader’s controversial “fatwa” against nuclear weapons. It was not so long ago that Iran’s critics in the United States were complaining that the fatwa was only oral and not written. I have not noticed anyone welcoming the written version.

The “reaffirmation” wouldn’t be worth the paper it is printed on except for the detailed limits and intrusive inspections that the agreement provides. No softie on Iran, Dennis Ross confirms that these fulfill previous Iranian commitments to limit centrifuges, enrichment, and enriched uranium; end all plans for separating plutonium; and no longer engage in any research and development related to a nuclear explosive device. International Atomic Energy Agency (IAEA) monitoring will be more comprehensive and intrusive than for other countries. While no system is foolproof, nuclear weapons have never been developed within an IAEA safeguarded program.

That leaves the possibility of a clandestine nuclear program outside the purview of the IAEA. There is reason to believe that Tehran had such a program until 2003, when it was allegedly stopped. Iran, which previously stonewalled IAEA inquiries on this subject, has now committed in the nuclear deal to clarifying its past nuclear activities with “possible military dimensions” by October 15, with a final assessment due from the IAEA on December 15. This will be an important early milestone in implementation (or not) of the nuclear deal. It is not the first time the Iranians have promised clarification. Beyond that date, the IAEA can request access to locations of concern. Iranian objections can be overridden by five of eight members of a joint commission overseeing implementation of the agreement. That joint commission includes five Western members (the United States, the UK, France, Germany, and the EU) as well as Russia, China, and Iran.

The agreement provides for sanctions to be lifted once Iran implements its obligations or passes certain time limits in compliance with the agreement. No sanctions get lifted without implementation, and some—like the arms embargo—remain in place for five or eight years (depending on the weapons involved). While most restrictions are lifted within 15 years, some remain in place in perpetuity, including strict IAEA safeguards and the prohibition on nuclear weapons research and development.

The question is what happens if one or another obligation is breached. There is an elaborate, but quick-paced (I count 35 days), dispute resolution mechanism. At that point, UN Security Council sanctions would be reinstated, unless the Council votes within 30 days to continue lifting them. This is a “snapback” mechanism, unprecedented so far as I know in the Security Council. It would give the United States (and other permanent members) a veto over sanctions lifting. Iran has stated that it would treat reinstatement of sanctions as grounds to cease performing its commitments.

So, is this agreement a good thing or a bad thing?

It depends on what you think the alternative might be. At worst, it would be no constraints on the Iranian nuclear program, no IAEA monitoring, and no multilateral sanctions, as the EU and China are champing at the bit to do business with a cash, oil, and gas-rich Iran. At best we might in the absence of an agreement be able to sustain the sanctions for a while but not likely the IAEA monitoring and technological constraints, giving others in the region reason to initiate their own programs to produce weapons-grade uranium or plutonium. War might set back the Iranian nuclear program for a few years, but it would also give them incentive to finish the job and unleash even more chaos than the region is currently enduring.

Relief from sanctions will unquestionably provide the Iranians with resources. Tehran is owed upward of $100 billion that will flow into its coffers, in addition to whatever its renewed exports will bring in today’s bearish oil market, likely to go down further because of Iran’s reentry into it. The Islamic Republic is a profoundly anti-Western regime that even without much available cash has managed to contribute to instability in Iraq, Syria, Lebanon, and Yemen. Its anti-Americanism may sound hollow after this agreement, which engages Iran in a continuing process involving the United States and three of its allies as well as the European Union, but unless there is a dramatic and unexpected change of heart at the top in Tehran we can anticipate more trouble from the Iranian Revolutionary Guard Corps and its proxies in the region and even beyond.   

America’s friends in the Gulf will therefore be nervous about the implications of this agreement, though the United Arab Emirates was quick to say it welcomed it. Israel denounced it even before the ink was on the page. But soon enough both the Gulf states and Israel will become keen about insisting on fulfilling its every letter, as they have with the interim agreement currently in effect.

The debate in Congress will be vigorous. Most Republicans and a good number of Democrats will oppose the deal on the grounds that it licenses Iran to become a nuclear threshold state, ignoring the Obama administration’s conviction that this would happen faster and with fewer controls in the absence of an agreement. But the opponents are unlikely to muster the two-thirds majority in both houses required to override a presidential veto. The Supreme Leader is thought to have given the green light for this deal, but he has not yet pronounced on it. Assuming he says a dramatically reluctant “yes,” the Iranian Majlis will not block it.

The saga of implementation has not yet begun. It will last 10-15 years. If the agreement holds and prevents Iran from getting a nuclear weapon, it will have made an enormous contribution to peace and stability. If it fails, we will have to deal with the ugly consequences: war or a nuclearized Middle East.