The Wall Street Journal’s Bret Stephens recently pointed out the sad record of American leaders who were bamboozled in the past by the Iranians. Carter’s administration bizarrely viewed the Ayatollah Khomeini as “a saint,” whose holy acts included holding Americans hostage for 444 days after our embassy was seized. “Ronald Reagan sent Khomeini a birthday cake, along with secret arms, to facilitate the release of hostages in Lebanon,” Stephens recalled. “A few hostages were released, while others were taken in their place.” When Iran elected its first “moderate” President, Mohammad Khatami in 1997, Iran escalated its secret nuclear program, which was not exposed until years later.

Stephens adds that the New York Times’s Roger Cohen, one of most ill-informed commentators on the Middle East, hailed the “the vibrancy of a changing, highly educated society” that he had found on his visits to Tehran. This was on the eve of the 2009 elections. “After the election,” Stephens notes that Cohen “ran for his life from the terror of the same street militia that had murdered Agha-Soltan.”

Now Cohen and other cheerleaders are writing rave reviews of the Iran nuclear deal and the new, friendlier, gentler Iran that is dying to work with us to defeat ISIL. Never mind the fact that Iranians have not given up their “Death to America, Death to Israel” mentality, continue to defy the world by testing ballistic missiles meant to carry the nuclear warheads they expect to have in the future, and have stepped up their aggression in Iraq and Syria and their threats against their Gulf neighbors.

After first agreeing to end the sanctions against Iran related to the nuclear deal, Obama did impose some relatively trivial penalties on Iran for its missile tests. The Iranians denounced them and promised to continue their research and development of missiles with the capability of carrying nuclear weapons and a range that would allow them to target Europe and perhaps the United States.

Iran further humiliated the president by having its ships open fire near U.S. Navy ships in the Persian Gulf and then capturing American soldiers at gun point, forcing them to kneel before them and coercing a serviceman to apologize to Iran. Rather than denounce this outrageous violation of the Geneva Convention and threaten retribution, John Kerry negotiated the soldiers’ release and claimed this to be a great diplomatic victory. The United States is not supposed to negotiate with terrorists, but this is exactly what Kerry did when he gave into their demands by accepting the mistreatment of our soldiers, and agreeing to release seven convicted Iranian criminals held in the U.S., in exchange for the release of four long-held American civilian hostages. Kerry neglected to mention his failure to win the release of additional Americans held hostage by Iran, including an American Jew who disappeared in 2007.

Giving in to terrorists, as Kerry did, endangers Americans everywhere because our enemies, especially Iranians, recognize that this administration will sacrifice citizens and principles to protect the nuclear agreement. It was no surprise, then, that within hours of the disclosure of the prisoner exchange, three U.S. citizens were kidnapped in Baghdad by an Iranian-backed Shi’ite militia.

Elliott Abrams believes that Obama’s reaction to Iran’s humiliation: “to welcome it and thank Iran for it,” will leave America’s friends worrying, “If this is how the Americans react to their own humiliation through an aggressive act, how will they react when we are in danger?”

Is it any wonder the Israelis have zero faith in Obama, America’s Arab allies are turning to Russia for support, and Saudi Arabia has built a coalition to confront Iran that excludes the United States?

The administration keeps trying to sell the notion that the world is safer thanks to their nuclear deal and continues to downplay the significance of providing Iran with billions of dollars to spend buying weapons, underwriting global terror, strengthening Hezbollah and Bashar Assad, expanding its influence in Iraq, fighting a proxy war against Saudi Arabia in Yemen and fomenting instability in North Africa and the Persian Gulf.

Even former members of Obama’s administration are incredulous at the naiveté of the President. Former Defense Secretary Robert Gates, for example, recently said, “The notion that betting that this regime is going to temper its behavior in the region because of this nuclear deal I think is mistaken. I think that will not happen.”

Still, the New York Times and other media shills for the administration published glowing editorials about the nuclear deal. “This is a moment many thought would never come: Iran has delivered on its commitment under a 2015 agreement with the United States and other major powers to curb or eliminate the most dangerous elements of its nuclear program. The world is now safer for this,” editorialized the Times.

Besides my general skepticism about the Iran deal, as a historian, I can’t help but recall the jubilation that accompanied the last great American nuclear deal, the one aimed at halting North Korea’s development of a bomb. Foreshadowing Obama, President Clinton said, “North Korea will freeze and then dismantle its nuclear program. South Korea and our other allies will be better protected. The entire world will be safer as we slow the spread of nuclear weapons.”

Does this also sound familiar: “There were also some confidential minutes supporting the agreement, which have not been made public….and the pact was neither a treaty subject to Senate approval nor a legally binding executive agreement, but a non-binding political commitment between the two countries noted by the United Nations Security Council.”

Here’s what the New York Times said on May 7, 1992, while talks were underway: “North Korea has lifted the veil from its nuclear programs, thereby lifting hopes that it is renouncing any ambitions to develop nuclear arms.” The editorial noted that North Korea provided the International Atomic Energy Agency details of its nuclear facilities and concluded, “Should the inspections proceed without a hitch, they would convince even the skeptics that all of Korea is nuclear-free. That would vindicate those in the Bush Administration, in Seoul and in Tokyo who sought to resolve the nuclear issue diplomatically.”

By January 1999, however, the Times complained that North Korea was building a new underground nuclear complex that it refused to allow anyone to inspect. On October 18, 2002, the Times wrote, “North Korea has stunned the world by acknowledging that it has been working to produce nuclear bomb fuel despite a 1994 agreement with the United States to freeze nuclear weapons development.” Foreshadowing what is likely to happen with Iran, the Times noted, “When caught, North Korea neither denied the program nor promised to end it. Instead it declared that supposed American actions had ‘nullified’ the 1994 agreement.” The editorial concluded, “Keeping nuclear weapons out of the hands of dictators who want them requires more than signed agreements.”

It’s shocking and dangerous that the administration didn’t learn the lessons of history. Now it will be up to Obama’s successor to apply those lessons to the Iranian deal to prevent a replay of the failure to stop North Korea’s nuclear program – if it is not too late.