ATHENS—Donald Trump has done what everyone feared he was going to do—almost. The president said he would not recertify the 2015 Iran nuclear deal (something that, according to its terms, the president must do every 90 days).

He stopped short of saying he would walk away from it entirely, but left that option wide open. He claimed the deal needed to be amended, and seemed to think that’s possible.

He made reference to Iran’s litany of crimes over the years, even suggesting that Shia Iran was somehow behind the al Qaeda attack on the United States in September 2011, which was carried out by 19 Sunni Arabs, 15 of whom were from Saudi Arabia.

I spent years researching Iran’s nuclear program for my book, Nuclear Iran: The Birth of an Atomic State, and in that time certain themes appeared again and again – all centering on Iranian political behavior.

To be clear: Iran is undoubtedly committing atrocities across the Middle East—from Syria to Iraq to Yemen. ‪Its Revolutionary Guards Corps (IRGC), which Trump cited in his speech, needs to be dealt with.

The question is what will best rein in Iran's behavior? This is key. Iran is going from a clerical to an IRGC state. Iran’s clerical establishment is becoming ever more sidelined. So let's understand what we are dealing with. Iran is both in a defensive and a revanchist mode. The desire to create a crescent of contiguous Shia states (or states with empowered Shia minorities) is real.

Those most opposed to the deal argued that it ignored Iran’s regional machinations and indeed, strengthened them, by unfreezing billions of dollars of Iranian assets. But this argument never held much weight because Iran refused to negotiate on anything other than the nuclear question.

And let’s be clear on something else: over 10 years of negotiations and then sanctions achieved nothing but allowing Iran to get to the brink of weapons capability. And if you think Iran is bad now, imagine it with the bomb.

Arguments that instead of a deal Iran should have been sanctioned and totally isolated are founded on a misunderstanding of the Islamic Republic mindset and an ignorance of history. During the 1980-1988 Iran-Iraq war Iran was totally isolated –it put its head down and carried on regardless. In fact isolation strengthened the clerical establishment - giving “proof” to their narrative of perpetual victimhood.

The question thus becomes: what is the best course of action?

The answer is containment.

If the alternative is to bomb Iran’s nuclear facilities, think on this: Tehran’s response would be immediate - and catastrophic. Hezbollah would fire hundreds of rockets into Israel. Iranian proxies would attack Western targets across the Middle East. It would be war, with or without the consent of Congress. And no one wants that, or indeed can afford it.

Which is why even those close to Trump urged him not to abandon the deal. Defense Secretary Jim Mattis told members of the Senate Armed Services Committee that “absent indications to the contrary, it [the deal] is something that the president should consider staying with.”

Given the President’s repeated criticism of the deal, however, it was clear he had to make a stand or risk losing face, and some sort of compromise seems to have been reached. The U.S. remains a party to the deal and Trump has now foisted the responsibility onto Congress, which will decide whether or not to impose sanctions on Iran.

The situation is now precarious. But it is important to remember that the deal is not a bilateral one between Iran and the U.S. but between Iran and the P5+1 (the five Security Council powers and Germany).

Already The U.K., France and Germany have declared the pact to be "in our shared national security interest." The E.U. has also said it was "not up to any single country to terminate" a "working" deal.

In fact, in a heavy irony (or perhaps this is strategy), if the U.S. does re-impose sanctions the party most likely to walk away from the deal may be Tehran.

Iran’s President Hassan Rouhani agreed the deal in the face of huge internal opposition from hardliners, who always argued that the “Great Satan” could not be trusted. Trump may well prove them right.

An Iran freed from the constraints of a deal violated by the U.S. would be ominous for both the Middle East and the wider world.

And people are taking notice.

Last week in Paris, the Luxembourg Forum on Preventing Nuclear Catastrophe gathered some of the world’s leading political figures and experts on non-proliferation. Chaired by Viatcheslav Moshe Kantor, a businessman and philanthropist, the consensus was clear: the dangers we now face in the nuclear sphere are both proximate and terrifying.

William Perry, the former U.S. Secretary of Defense in the Clinton administration, weighed in with some history to illuminate just how grave the situation is becoming—and how close we have come in the past.

“We got so close to a civilization-ending war with the Cuban Missile Crisis,” Perry said with evident passion. “Have we forgotten it? I will never forget it. I was there—part of a small team, working all day and by midnight presenting a report to [President John F.] Kennedy. Every day I woke up I thought it would be my last day on earth. Kennedy later said he thought that there was one in three chance of nuclear holocaust. I believe he was an optimist.”

“If Kennedy had accepted the unanimous urging of his joint chiefs of staff we would have had nuclear war,” said Perry. “I want to emphasize no matter how much Kennedy and Khrushchev didn’t want it, we almost blundered into it. We didn’t know it then but the Soviets had already deployed tactical nukes to Cuba. If Kennedy had taken his generals’ advice and invaded Cuba our forces would have been decimated.”

Across the conference there was a near universal fear of what an increasingly desperate Russian President Vladimir Putin might do in the face of a collapsing economy. How far would be push his foreign policy adventurism in Ukraine and Syria?

It was left to Perry, celebrating his 90th birthday this week, to articulate what may well become the great foreign policy issue of the next decade. “Russia may soon have to choose between guns and butter,” he concluded. “And that is not good for anyone—it could lead to real, and lasting, danger.

In case you’ve lost track in a news cycle crowded with scandals and distractions: the world’s most powerful man, U.S. President Donald Trump, is threatening to decertify the 2015 Iran deal that has kept the Islamic Republic from getting the bomb. At the time the deal was done, after more than a decade of fruitless Western sanctions, Iran was on the very brink of nuclear weapons capability: a matter of months, perhaps less.

Trump has long expressed disdain for the deal, which allows for close international scrutiny of Iran’s frozen nuclear program in exchange for the lifting of sanctions and unfreezing of Iranian assets.

That is not, however, a view shared by the International Atomic Energy Agency (IAEA), the body charged with monitoring the deal to ensure all parties are in compliance—especially Iran.

As if that were not enough nuclear instability for the world to deal with, Trump has also blustered relentlessly about North Korea’s (arguably even more) deranged leader Kim Jong Un. He recently declared that North Korean threats would be met with “fire and fury” and at last month’s U.N. General Assembly vowed to “totally destroy” Pyongyang if need be.

Unlike Iran, North Korea is now a full-fledged nuclear weapons state. Trump may threaten fire—but he is certainly playing with it.

The “wise men” at the conference, who included former IAEA head Hans Blix and leading nuclear expert George Perkovich, in Paris concluded that the only solution is for the major nuclear powers, namely, Russia and the United States—in this one area at least—to put aside geopolitical differences and seek to reduce their nuclear arsenals. Despite Trump’s well-known dislike of China, it too, must be brought on board.

In the words of former British Prime Minister Tony Blair, “without China, Russia and the other emerging powers it is hard to see how non-proliferation can be successful.”

Blair was equally forceful on the Iran deal: “It’s very controversial,” he admitted. “And we can debate its wisdom and some of its terms. But now it is done and needs to be preserved. I spend so much time in the Middle East and repeatedly hear the concerns of other states about the destabilizing effects of Iranian behavior. Pushback is vital and urgent and can be done by conventional means. But abandoning the [nuclear] deal would add another dimension that we do not need.”

And, finally, he echoed Kantor’s belief that the U.S.-Russia relationship was central to the international non-proliferation regime, observing that “the role of Russia, whatever our other disagreements with it, is essential to combat proliferation. Multilateral diplomacy is a little out of fashion nowadays—it should not be. It is crucial and unavoidable if we are to avoid serious risks.”