Seventy-two years ago today, the last nuclear weapon detonated in the conduct of a war exploded some 1,600 feet over Nagasaki, Japan. Given this week’s news of the growing nuclear threat from North Korea, the memories associated with the U.S. bombing that ended World War II grow more resonant.

While the horrific toll of the attack is remembered by all, the chain of accidents and curious twists of fate that led to the unimaginable suffering involved has largely been forgotten. Nagasaki was not one of the prime targets for the attack. Kyoto, atop the list, was likely spared in part because Secretary of War Henry Stimson had gone there on his honeymoon decades before. It was not even the primary target for the Aug. 9 bombing run. That had been Kokura, which was obscured by “ground haze and smoke” when the B-29 Superfortress carrying the plutonium bomb nicknamed “Fat Man” made its pass over the city early that morning.

The plane carrying the bomb, Bockscar, was delayed the morning of the raid due to mechanical issues. The bomb missed its target by about a mile and a half. Bockscar nearly ran out of gas after completing its mission, forcing it to make an emergency landing on Okinawa. It was a very dark reminder of the role that error plays even in the most carefully managed, high-priority military operations.

With reports that North Korea has now developed miniaturized nuclear weapons that can be fit inside its missiles, the specter of such attacks and of the role that errors play in them is worldwide. This weekend, the U.N. Security Council demonstrated the gravity of the situation with a vote imposing $1 billion’s worth of export sanctions on North Korea. It was a rare 15-0 vote in which both China and Russia voted with the United States and against the government in Pyongyang.

But the likelihood that the sanctions have any lasting impact on Kim’s nuclear program is very low. This is the seventh set of sanctions the United Nations has imposed since 2006. North Korea is a totalitarian state whose the government has shown no hesitation to make its people suffer to advance government goals. Further, Kim sees the weapons as an insurance policy, a way to protect himself against efforts to unseat him and his clique.

This raises the prospect that Kim will continue to accelerate his efforts to gain the ability to threaten the United States and its allies.

A North Korea with the ability to deliver nuclear weapons that could strike as far away as the United States would change the calculus of international security more dramatically than anything that has happened since the end of the Cold War. Old concepts such as deterrence might not work as well with its seemingly irrational leader. North Korea is doubly dangerous as a potential exporter of its technologies to other bad actors, including terrorists. Furthermore, North Korea’s actions might accelerate reciprocal efforts in other countries such as Japan.

In the, past U.S. concerns about North Korea have led other administrations to conclude that going to war — even a war with hundreds of thousands of casualties on the Korean Peninsula — was worth it. In a conversation last week, former Clinton defense official Graham Allison confirmed that was a conclusion reached by the top leaders at the Pentagon two decades ago. To suggest that it is too bloody to contemplate is to misunderstand the threat involved, history and human nature.

But worse, this crisis comes at a moment when America has another dangerous rogue actor to contend with: the president of the United States. Trump is every bit as erratic as Kim is and is less schooled on these issues than his counterpart. His comment that North Korea would be met by “fire and fury and frankly power, the likes of which this world has never seen before” underscored this.

A couple of years ago, I wrote a book called “National Insecurity: American Leadership in an Age of Fear,” in which I described and lamented the consistent overstatement of the terrorist threat by Presidents George W. Bush’s and Barack Obama’s administrations. There was craven, cover-your-behind politics at work that had high costs and promoted anxiety worldwide. I had hoped the 2016 election would bring an end to that. Instead, Trump has not just embraced their overstatement of the terrorist threat; he has gone far further than them by arguing that all Muslims and most immigrants pose a danger to our well-being and way of life.

But now we are faced with the threat of Trump, Kim and a nuclear standoff. All the more likely outcomes are bad — Kim gets his capability or we fight a bloody war. And the better outcomes — talks — seem unlikely to forestall Kim’s quest for too long. Sometimes fear is the tool of opportunistic politicians. But sometimes it is warranted.

Beijing has leverage in the North Korea situation and, seemingly, the steadiest leadership. But China has been largely ambivalent. In the end, its will to act is likely that is all that stands between us and calamity.

This is a genuinely unsettling moment — in large part because the leaders on both sides are the type that makes accidents even more likely. And as we know, in war and in crisis, such twists are the norm, not the exception.