Evan Thomas, the author of “Ike’s Bluff,” is at work on a book about the last two weeks of World War II.

On Aug. 8, 2017, President Trump told reporters at his golf resort in Bedminster, N.J., that if the North Koreans threatened the United States with missiles and nuclear bombs, “they will be met with fire and fury like the world has never seen.” In “The Bomb,” his excellent history of nuclear war and its long shadow, Fred Kaplan reminds us that after America dropped the atom bomb on Hiroshima in August 1945, Harry Truman warned the Japanese of “a rain of ruin from the air, the like of which has never been seen on this earth.” It is not clear that Trump knew he was echoing Truman, but any American who was paying attention could feel a chill.

Ever since the early days of the nuclear age, the president of the United States has had the legal power to order a nuclear strike; to initiate, on his or her own authority, a war that could end the world. That is why the stability and good sense of the person with a finger on the trigger are so critical — now, perhaps, as much as at any time during the frightening days of the Cold War.

The responsibility can be a lonely one. Toward the end of the 13 days of the Cuban missile crisis in October 1962, Defense Secretary Robert McNamara, national security adviser McGeorge Bundy and Chairman of the Joint Chiefs of Staff Maxwell Taylor were counseling President John Kennedy to order an airstrike, followed by an invasion in seven days, to remove the nuclear missiles recently installed in Cuba by Soviet leader Nikita Khrushchev. Only the president knew better. He disregarded their advice and instead cut a secret deal, disclosed years later, to trade some obsolete NATO missiles in Turkey for the Russian missiles in Cuba. “Decades later,” Kaplan writes, “Khrushchev’s former advisers would reveal that 43,000 Soviet soldiers had been hiding on the island to defend the missiles in case of an invasion. Kennedy was right: if the United States had attacked, he would have been at war with the Soviet Union.” (Kaplan could have added that those Soviet troops were armed with tactical nuclear weapons.)

Starting with Kennedy, every Cold War president was briefed, shortly after taking office, on something called the SIOP, or Single Integrated Operational Plan — the U.S. nuclear war plan for taking out the Soviet bloc and communist China, essentially by throwing the works at every city, industrial plant, military base and leadership post, including their vacation dachas. After Kennedy’s initial briefing on the SIOP, there was stunned silence in the room. Turning to Secretary of State Dean Rusk, who was sitting beside him, Kennedy said, “And we call ourselves the human race.” The president, notes Kaplan, “instructed everyone in the room not to tell anybody else about even the subject of the meeting.”

Troubled by the apocalyptic overkill of the SIOP, nuclear experts in almost every presidential administration for the next 40 years looked for ways to fight a “limited” nuclear war. “The SIOP is a horror strategy,” said Richard Nixon’s national security adviser, Henry Kissinger.

Kaplan, an MIT PhD and longtime writer for Slate, is also the author of “The Wizards of Armageddon,” published in 1983, a classic study of defense intellectuals of the Dr. Strangelove variety. In “The Bomb,” he uses more recently released classified documents to focus on the actual policymakers, describing with lucidity and a healthy dose of dark irony their trips down the rabbit hole. Try as they might, strategic geniuses like Kissinger and lesser-known types could not find a way to guarantee that once the bombs started falling, someone, somewhere, would have the ability to make them stop.

Not that all the theorizing and planning at the highest level really mattered to the warfighters. Kaplan showed that the Strategic Air Command, based in Omaha, continued to target missiles and bombs to make the rubble bounce — again and again. Almost 700 nuclear warheads were aimed at a 50-mile radius around Moscow. At the end of the Cold War, the persistence of some Pentagon reformers resulted in cutting the number of strategic nuclear weapons by about half, from 12,000 to 5,888, then to 3,500. But that arsenal was still enough to stagger, if not snuff out, civilization, since the Russians and Chinese kept stockpiling their own weapons.

And the nuclear arms race was hardly over. In an unsuccessful attempt to bluff the Kremlin into leaning on North Vietnam to make peace, Nixon in 1969 had trotted out his “madman theory,” signaling to his nuclear foes that he was so crazy, he might do anything to win the war in Vietnam. Some years later, North Korea has taken Nixon’s bid and raised it. “North Korea,” writes Kaplan, is “the shrewd lunatic who very visibly throws his steering wheel out the window, forcing the other, more responsible driver to veer off the road.”

The mostly responsible drivers occupying the White House from Jimmy Carter through Barack Obama cast about for ways to keep the North Koreans from crashing everyone off the cliff. The diplomats bought time but never succeeded in disarming the angry saber-rattlers in Pyongyang.

Trump came in with a different attitude. How different became alarmingly clear the first time the Pentagon showed him a chart illustrating the strides taken by the Americans and the Russians to reduce nuclear weapons over the decades. “Trump viewed the chart from a different perspective, telling the group he wanted more nuclear weapons,” writes Kaplan. “He pointed to the graph’s peak year, 1969, when the United States had 32,000. . . . Trump asked why he didn’t have that many weapons now.” When Trump left the room, Secretary of State Rex Tillerson muttered, loud enough for others to hear, that the president was a “f---ing moron.”

With his particular mixture of threats and glad-handing, Trump appeared, for a time, to get North Korean leader Kim Jong Un to back off his bluster and his nuclear tests. But the rhetoric has heated up again, and so has the danger. Kaplan’s book is a timely reminder of the need to take a deep breath before thinking the unthinkable.

The Bomb

Presidents, Generals, and the Secret History of Nuclear War

By Fred Kaplan

Simon & Schuster. 372 pp. $30