For the nuclear deal to endure, tension between Washington and Tehran on other issues must be contained or the nuclear deal must be sufficiently insulated to survive external turbulence. It is difficult to see, for instance, how the deal can remain in place while the United States and Iran engage in direct or indirect confrontations throughout the region.

If the United States reneges on its obligations under the deal, Iran is likely to follow suit and start expanding its nuclear activities — regardless of who wins the presidential elections. As Iran gets closer to possessing a nuclear weapon, the United States will once again inch closer to war. That was precisely the situation in 2012 and 2013: Faced with the realization that the United States’ sanctions policy was more likely to lead to war than to Iran’s capitulation, President Barack Obama decided to double down on finding a diplomatic solution through secret talks held in Oman. This time around, the American president won’t have a diplomatic exit ramp.

For many of the hawks in Washington, this is a lesser problem than the constraints the nuclear deal has imposed on the United States’ ability to confront Iran elsewhere. That is not an accident: The deal aimed to make an escalation of tensions between the United States and Iran more difficult and costly for both countries. For Iran, this has restrained its policy on Israel. Iran’s actions and rhetoric on the Jewish state have shifted remarkably ever since nuclear negotiations began. Iran’s stance on the 2014 Gaza war is a case in point: Tehran remained relatively silent and did little to add fuel to the fire compared with what it might have done under other circumstances. The Iranians understood that they could not secure and sustain a nuclear deal with the United States without shifting their posture on Israel.

And therein lies the true promise of the nuclear deal: Precisely because of its value, both sides are incentivized to contain their other disputes to ensure its survival. Over time, this could convert the United States and Iran from sworn enemies into mere competitors.

During the negotiations, Iran’s foreign minister, Mohammed Javad Zarif, told me numerous times that he was frustrated that Washington didn’t recognize that the nuclear deal could be a base rather than the ceiling for American-Iranian relations. It could create the possibility of America losing an enemy in the Middle East. When was the last time that happened?