The most dangerous moment of the nuclear age — and likely any age — unfolded 50 years ago as the world waited and trembled. For 13 harrowing days, the leaders of the United States, the Soviet Union, and Cuba brought the planet within a hair’s breadth of nuclear catastrophe. Despite the seemingly halcyon stability of deterrence throughout the Cold War, there were numerous moments during the Cuban Missile Crisis that could have escalated into full-blown nuclear war.

The most dangerous moment of the nuclear age — and likely any age — unfolded 50 years ago as the world waited and trembled. For 13 harrowing days, the leaders of the United States, the Soviet Union, and Cuba brought the planet within a hair’s breadth of nuclear catastrophe. Despite the seemingly halcyon stability of deterrence throughout the Cold War, there were numerous moments during the Cuban Missile Crisis that could have escalated into full-blown nuclear war. As then-Defense Secretary Robert McNamara put it some years later, “We’re damn lucky to be here.” As the 50th anniversary of the crisis approaches, the implications of this near miss with disaster still resonate. As long as nuclear weapons exist — and right now approximately 22,000 of them can be found in nine countries — the risk of cataclysm remains. We lucked out in 1962. We may not be so lucky next time.

Declassified history and a crisis laid bare. The Cuban Missile Crisis began on October 16, 1962, when President John F. Kennedy was shown photographs taken by a U-2 spy plane exposing the secret construction of Soviet nuclear missile sites in Cuba. The crisis ended on October 28, 1962, when the Soviet Union’s leader, Nikita Khrushchev, agreed to withdraw the Soviet arsenal of missiles and nuclear warheads from the island in exchange for America’s public commitment not to invade Cuba and its secret commitment to withdraw US Jupiter missiles from Turkey at a later date. Most experts agree that had the crisis gone on any longer, the United States would have launched an air attack and ground invasion of Cuba, unwittingly triggering a Soviet nuclear assault.

For many years after the Cuban Missile Crisis, the conventional wisdom followed a common narrative: Khrushchev secretly deployed missiles in Cuba to correct the US-Soviet nuclear balance. US intelligence discovered the Soviet leader’s treachery but did not know two important facts: that the deployment was not yet complete and that the nuclear warheads to arm them had yet to arrive on the island. Kennedy, resisting repeated calls from several advisers to launch an air attack and invade Cuba, resolutely yet peacefully forced Khrushchev to relent. Cuba and its leader, Fidel Castro, meanwhile, played no meaningful role in the crisis, except as a parking lot for the missiles.

Or so the story went.

Beginning in the 1980s, however, researchers began to reexamine the situation. On the 30th and 40th anniversaries of the Cuban Missile Crisis, two conferences in Havana, Cuba, brought together newly declassified documents, scholars, and key players in the events of October 1962 from the United States, Soviet Union, and Cuba, including McNamara and Castro. Thanks to these conferences and additional revelations, we now know the conventional wisdom was incomplete at best and the threat of nuclear war was much greater than anyone could have imagined.

For example, unbeknownst to Kennedy, 98 Soviet tactical nuclear weapons were in fact already in Cuba. What’s more, ground commanders had been authorized to employ the weapons should the United States invade. (And Soviet commanders likely would have done just that.) Kennedy also did not know that some Soviet submarines escorting ships to Cuba were armed with nuclear-tipped torpedoes. Which led to October 27 — the most dangerous day of the Cuban Missile Crisis. A Soviet submarine commander, under barrage by US depth charges, believed war between the Soviet Union and the United States must have already begun. He prepared to fire the nuclear-tipped torpedo. However, authorization to fire the torpedo required assent from the three officers on board. Two officers were in favor of launching the torpedo — fortunately, one was not. One. It was what Kennedy and Khrushchev did not know and could not control that made the crisis so perilous.

Perhaps the most startling revelation from the new scholarship is the degree to which events were driven by what transpired in and around Cuba before and during the crisis. As Michael Dobbs has written: “By authorizing the Bay of Pigs invasion [in 1961], followed by Operation Mongoose, Kennedy had given the Soviets every reason to believe that he was determined to get rid of Castro once and for all. To protect his Caribbean ally, Khrushchev made the reckless decision to deploy nuclear missiles … right on America’s doorstep.” While Kennedy had no intention of invading Cuba following the Bay of Pigs debacle, he failed to appreciate how that and subsequent US actions were interpreted in Moscow and Havana. Castro — convinced a US invasion was imminent — repeatedly encouraged Cuban and Soviet troops to provoke a conflict with the United States, culminating in an October 27 letter to Khrushchev urging the Soviet leader to destroy America in a nuclear first strike.

Today’s nuclear danger. The Cuban Missile Crisis provides clear evidence that nuclear war is all too possible, especially during an emergency situation in which critical decisions must be made quickly, accurate information is unavailable, and events on the ground cannot be controlled. Moreover, it demonstrates that nuclear war is unlikely to be premeditated, but rather the result of misperception, miscalculation, and risk-taking. In such cases, the first use of nuclear weapons may even seem rational — or at least more rational than having to respond to a nuclear attack.

While the threat of global nuclear war is significantly less than during the Cold War, the risk of catastrophe has not disappeared. Given today’s United States and Russia, the threat of deliberate nuclear attack seems unthinkable, but the danger of accidental or miscalculated deployment is disconcertingly plausible — especially as thousands of US and Russian weapons remain ready to launch within minutes of a decision to do so. In South Asia, India and Pakistan have already fought two conventional conflicts since acquiring nuclear weapons. In North Korea, an unpredictable and cryptic danger looms. The threat of brazen terrorists wielding nuclear arms is chilling. And the impasse over Iran’s nuclear program only heightens tensions. This all increases the complexity and probability of the risk.

The Cuban Missile Crisis has taught us that the threat of nuclear calamity is only an error or misperception away; but the historic crisis is also instructive in other ways: Delaying disaster or making distasteful compromises may be preferable to scare tactics or an outright attack. Take Iran’s nuclear program. In a provocative Washington Post article, Harvard’s Graham Allison compares the US-Iran standoff to a Cuban Missile Crisis in slow motion. Instead of choosing between attacking Iran’s nuclear facilities or acquiescing to a nuclear-armed Iran, Allison argues that President Obama ought to follow in Kennedy’s footsteps and “explore alternatives that, however unacceptable, are less catastrophic.” (In a nutshell, Allison proposes Iran permanently and verifiably abandon enrichment beyond 5 percent in return for US acceptance of Iran’s continued enrichment up to that level.)

The only permanent exit ramp from the specter of nuclear annihilation is the abolition of nuclear weapons. Nuclear disarmament is daunting and not risk-free itself, but there are steps that can be taken now to tackle that challenge and to reduce the chances of a nuclear nightmare. The onus is on the world’s two largest nuclear powers — the United States and Russia — to continue to lead the charge. The two nations must abandon nuclear postures premised on nuclear war-fighting, pursue more arms control agreements to verifiably eliminate excess weapons, and strive to ensure that policy disagreements do not grow into dangerous crises.

Like the Iran case, this interim strategy may not be perfect; but a key lesson of the Cuban Missile Crisis is that crisis prevention is preferable to crisis management — particularly when nuclear weapons are involved.