Iranian Foreign Minister Mohammad Javad Zarif has declared that any European attempt to hold Iran to account for stepping back from its nuclear commitments could lead Iran to far more broadly step back from the Nuclear Non-Proliferation Treaty. Zarif may seek to scare Europe into concessions, but his reading of precedent and Iran’s ability to simply walk away is severely flawed: While Iran can walk away from the NPT and the International Atomic Energy Agency, it cannot wipe blank the slate of outstanding concerns. It is an issue I dealt with at length in Dancing with the Devil, a history of U.S. diplomacy with rogue regimes like Iran’s and North Korea’s.

In September 2005, the IAEA referred the Islamic Republic of Iran to the United Nations for persistent violations of its NPT Safeguards Agreement. Whereas the flawed intelligence prior to the 2003 Iraq War was based on secret sources and was in error essentially because Saddam Hussein bluffed with the result that signal intercepts and defector debriefings both affirmed the other, the intelligence the IAEA used to find Iran in violation was unclassified, the result of transparent inspections. The 2011 IAEA report annex outlining the “Possible Military Dimensions” of Iran’s nuclear program—activities with no civilian purpose left unexplained by Iran—was particularly damning.

The rest is history.

Iranian authorities alternated between bluster and voicing grievance. Sometimes they did more: Just days after Supreme Leader Ali Khamenei warned the British government not to support more sanctions at the United Nations, the Islamic Revolutionary Guard Corps seized British sailors in the Shatt al-Arab. More recently, Iranian authorities resorted to the type of hostage-diplomacy which has become the hallmark of the Islamic Republic in order to extract concessions from the Obama and Trump administrations.

While many European officials and critics of Trump’s decision attribute Iran’s renewed nuclear activities to Trump’s decision to withdrawal from the Iran nuclear deal, few consider that the 2015 nuclear deal was a dangerous deception: it both unraveled non-proliferation precedent established when South Africa and Libya came in from the cold, and allowed Iran to maintain more P-1 centrifuges than Pakistan had when it built its nuclear arsenal.

While nuclear deal supporters say the agreement curtailed Iran’s nuclear ambitions and blocked all pathways to a bomb, they neither explain the loosened restrictions vis-à-vis South Africa’s case nor why the agreement’s expiration, the so-called sunset clauses, contribute to security. Nor do inspections matter if they remain more theoretical than actual. Fear of Iran walking away or Iraq-style refusals led the IAEA to avoid military base inspections.

In reality, the Iran nuclear deal did little more than the NPT and the Additional Protocol to which Iran promised to conform even while having refused to ratify it. Now Iranian authorities are threatening to leave the NPT entirely.

Does such an action effectively give Iran a free pass?

The basis of the NPT is technology sharing in exchange for forfeiting nuclear weapons ambitions and agreeing to controls and inspections. So, did Iran effectively pull a fast one, grabbing the technology before leaving the NPT in order to pursue a program absent control?

This is essentially what North Korea did.

Just as 25 years ago, the parameters of the debate remain the same: Those prioritizing preservation of the NPT feared that calling out Pyongyang’s cheating would show that the NPT was the "emperor without clothes." Groups such as the Arms Control Association were willing to turn a blind eye to nuclear cheating for fear of what the world would look like if the NPT was exposed to be powerless. Those who prioritized security, however, sought to deal with the reality of the North Korean threat.

While first the George H.W. Bush administration and then the Clinton administration ultimately let North Korea off the hook for diplomatic reasons, both administrations engaged in interesting legal debates relevant today. When considering whether and under what circumstances North Korea could withdraw from the NPT, some lawyers argued that Pyongyang could only withdraw once it had addressed previous violations. Only when these were rectified, they held, would North Korea be free to go. In short, the IAEA and UN could continue to address any Pyongyang cheating during the time of its membership in the NPT. It is analogous to someone being culpable for murder under U.S. law, even after they flee the country and renounce their citizenship.

The same is now true for Iran. Tehran can withdraw from the NPT as Zarif now threatens, but that does not mean the international community cannot hold the Islamic Republic accountable for the decades of cheating that occurred while it was a signatory. It is this cheating that Zarif cannot erase with a stroke of a pen.

Michael Rubin (@Mrubin1971) is a contributor to the Washington Examiner's Beltway Confidential blog. He is a resident scholar at the American Enterprise Institute and a former Pentagon official.