Three years ago, President Obama, in a discussion about the threat of a nuclear Iran, bluntly rejected a policy of containment. It would be dangerous, he suggested, to believe that the United States could contain Iran in the same way it contained a nuclear Soviet Union. In an interview with me, and then in a speech before AIPAC, he argued that a nuclear-armed Iran would represent an acute threat to Israel, as well as a “profound” national-security threat to the United States itself, in part because the existence of an Iranian bomb would likely trigger a nuclear-arms race in the world’s most volatile region.

To reassure Israelis, whose country is targeted for elimination by the Iranian regime, he said, in the interview: “I think that the Israeli government recognizes that, as president of the United States, I don't bluff. I also don't, as a matter of sound policy, go around advertising exactly what our intentions are. But I think both the Iranian and the Israeli governments recognize that when the United States says it is unacceptable for Iran to have a nuclear weapon, we mean what we say.”

The preliminary nuclear deal announced on Thursday in Switzerland means that Obama may very well succeed in keeping his promise to Israel. Iran, it appears, will not gain possession of a nuclear weapon while he is president. If Iran adheres to the terms of the deal, as best as we understand those sketchy terms today, it will not have a nuclear weapon during the terms of the next one or two U.S. presidents. However, this deal, should it actually be ratified in June, formalizes Iran’s status as an eventual nuclear-threshold state by allowing it to maintain a vast nuclear infrastructure. This was not part of the international community’s original plan, and it is a cause for worry.

I’ve been reading many of the early analyses of this deal, and I agree with the commentators who argue that the United States and its partners in the "P5+1" group of world powers actually succeeded in extracting significant concessions from the Iranians. Opponents of the Iranian nuclear program should be pleased to see in the preliminary deal limitations on the number of centrifuges Iran is allowed to operate; they should be pleased to learn about the level and intensity of outside inspection of Iran’s nuclear facilities; they should also be provisionally pleased to learn, contra statements from the Iranian foreign minister, that many sanctions will be lifted only in response to specific Iranian actions.

But the truth remains that this provisional agreement can be considered a success mainly within a specific reality created by Obama and his European partners. This reality is one in which the goal was to moderate Iran’s behavior on a single issue, and not to remove the regime responsible for this behavior; this reality was one in which the Western powers preemptively agreed that Iran possessed an inherent “right” to enrich uranium on its soil, and possessed a right to maintain a nuclear infrastructure; this reality was one in which sanctions may not have been given sufficient time to work. I was struck, early in this process, by the first American concession to the Iranians. This came when Wendy Sherman, the chief American negotiator, labeled as “maximalist” U.N. Security Council demands that Iran cease enrichment activities. Once the U.S. signaled to the Iranians that they did not have to take the Security Council seriously, the die was cast.

All that said, within the specific reality Obama and his partners created around this issue, the deal appears to be better than expected in some important ways, though, of course, the details of many of the deal’s provisions have yet to be settled. I’ll review some of those specific details in a future post.

The best argument Obama can make for this deal is the argument he’s consistently made—that a deal is better than the alternatives. There is much apocalyptic talk emanating from Israel at the moment, and I understand it. The imbalance in the Iran-Israel relationship is not often understood, especially by cheerleaders for a deal. Iran seeks the physical annihilation of Israel. Israel seeks cordial relations with Iran. Of course Israel is worried that an anti-Semitic regime will be allowed to maintain a nuclear infrastructure.

But I hope Israelis listen to people such as the columnist Nahum Barnea, who wrote, following the announcement of the deal, “Obama presented the agreement as the lesser of two evils. The other options—striking at Iran’s nuclear facilities and thus starting a war, or continuing with sanctions and allowing Iran to get the bomb—would have led to a far more dangerous reality.”

War would not end the Iranian nuclear challenge. Israeli strikes, and certainly U.S. strikes, could destroy much of the physical infrastructure of the Iranian nuclear program, but cruise missiles cannot destroy knowledge, and I doubt they could destroy the will of the regime. Iran would rebuild those facilities, and would do so free from the burden of international sanctions, which would most likely crumble after such a preventative attack. Sanctions, too, were not bringing Iran to total capitulation. I do think that sanctions concentrated the attention of the regime, and that additional sanctions might have helped improve America's negotiating position. But the Iranian regime was not going to capitulate in the face of a collapsing economy. It would have adapted.

The biggest test facing the Obama administration now—apart from actually getting the deal, in all its complicated detail, done by the end of June—is in confronting the challenge a resurgent Iran is posing across the Middle East. Two things about President Obama are true: He and his team approached these negotiations assuming that Iran would lie, cheat, and steal, but he also holds out hope that a deal—and the economic benefits that flow from such a deal—will strengthen the hands of Iranian moderates. I tend to doubt this last part. I don’t believe that a bullying, terror-supporting, Assad-backing would-be regional hegemon whose ideology is built on anti-Americanism becomes more reasonable once it becomes richer and more empowered.

Which means that Obama will now have to do the thing he has been reluctant to do so far: confront Iran in Syria and Yemen and Lebanon in a sustained and creative way. He’s been reaching out to Israel and to America’s Arab friends in order to formulate such a strategy—a strategy U.S. allies in the Middle East have been begging him to devise—and I believe he realizes that he has a freer hand to confront Iran’s regional ambitions now that he’s secured a preliminary nuclear agreement. I hope he uses his power to check these ambitions, and I hope he spends the next three months making sure that the final deal is as stringent as possible. There is no way for an American president to guarantee that, years after he leaves office, Iran will not gain control of nuclear weapons. But there are still things this American president can do to check Iran’s power in long-lasting ways.