When John F. Kennedy spoke at the United Nations on September 25, 1961, he talked about the dangers of the atomic age. “Today, every inhabitant of this planet must contemplate the day when this planet may no longer be habitable,” he said. “Every man, woman, and child lives under a nuclear sword of Damocles, hanging by the slenderest of threads, capable of being cut at any moment by accident, or miscalculation, or by madness. The weapons of war must be abolished before they abolish us.” Contrast those remarks with the thoughts of the reality-show star, real-estate developer, and President-elect Donald J. Trump, who, just before Christmas, tweeted that “the United States must greatly strengthen and expand its nuclear capability until such time as the world comes to its senses regarding nukes,” and, on MSNBC’s “Morning Joe,” outdid himself by saying, “Let it be an arms race. We will outmatch them at every pass and outlast them all.” It’s hard to say what he meant when, on January 2nd, he tweeted, “North Korea just stated that it is in the final stages of developing a nuclear weapon capable of reaching parts of the U.S. It won't happen!”

There’s been progress since the time of Kennedy’s speech, including a partial test-ban treaty, in 1963, and important agreements by succeeding Administrations to limit strategic nuclear weapons. Yet, as Eric Schlosser recently wrote, in an unsettling survey of the current nuclear field, the risks of catastrophe are greater than ever and the safeguards alarmingly inadequate. So when a President-in-waiting uses a tweet or a drive-by cable-television moment to casually kiss off the excruciatingly difficult history of nuclear strategy and international treaties, it raises questions that go beyond policy to competence, and to rationality.

There’s no need to dwell on the particular character of Trump, who will be sworn in on January 20th. But it is worth examining what remedies exist if any President is too careless, inattentive, or impulsive to deal sensibly with questions affecting the nation’s survival. What could be done if a President behaves in a way that directly threatens to turn the planet into radioactive dust? And who could do it? Or, to rephrase that for a super-partisan era, who would be brave enough even to cross party lines, if taking that step were required to stop someone who, acting on a whim or in a tantrum, seemed ready to start a nuclear war? It might not take much to arrive in such a scenario; after all, it didn’t take much, recently, for Pakistan’s defense minister, reacting to a loony fake-news dispatch, to threaten nuclear retaliation against Israel.

The Constitution does provide certain remedies, foremost among them being impeachment, though that requires a high crime or misdemeanor, a House bill, a Senate trial. But there is another path, also complicated, and possibly impractical. President Obama, the other day, addressed some of the charming creakiness that the Founders left for their descendants, such as the compromise that gives equal senatorial representation to California, with thirty-eight million people, and to Wyoming, with little more than a half-million. That disproportionate inheritance is not likely to be changed, just as the Electoral College is unlikely to be changed—at least not any time soon; the Founders made it difficult to tamper with their extraordinarily durable, imperfect document.

But what if it were a matter of imminent peril, having to do with Presidential instability, or even insanity? In researching a book on the relationship between President Dwight D. Eisenhower and Richard Nixon, his Vice-President, I became engrossed by this issue, and in particular by the question of what might have been done if Eisenhower, who suffered a stroke in the fall of 1957, was incapable of finishing his second term, as happened to Woodrow Wilson in the last eighteen months of his Presidency. Who could step in? (In Wilson’s case, it seems to have been his wife, Edith.) At the Library of Congress and at the Eisenhower Library, in Abilene, Kansas, I found an illuminating correspondence between Ike’s Attorney General, William Rogers, who couldn’t see where the Constitution addressed the question, and the Supreme Court Justice Felix Frankfurter, who believed that the framers purposely ignored the issue because of their realization “that almost any means created its own problems and that therefore the matter was to be left to the pressure of events whenever the contingency arose.” And, Frankfurter wrote, “I need hardly add that there were no keener, more resourceful draftsmen than Hamilton and Madison,” so they must have “concluded to leave the matter in the undefined form in which it now stands.” Rogers, who was interested in how those circumstances might affect Nixon, who was his friend, had no better answer.

The nation was lucky. Ike made a quick recovery and about two months later sent Nixon a memorandum to try to sort out the question of Presidential inability. It discussed steps that might be taken if he couldn’t do his job, or—what was far more difficult—if he were unable to recognize his incapacity. Eisenhower proposed that Nixon, as Vice-President, could make the call that the President was incapacitated, while Eisenhower retained the power to declare himself recovered. Eisenhower didn’t much like the idea of turning the Presidency over to Nixon, but he never worried that Nixon would do anything untoward; rather than a formal legal document, he favored a personal letter, “particularly in view of our mutual confidence and friendship.” Still, under this model, the Presidency could have become subject to competing claims about competency.

The question did not get proper constitutional attention until Congress, in 1965, passed the Twenty-fifth Amendment, which two years later was ratified by the required three quarters of the states. The most pressing issue at the time was dealing with the Vice-Presidential vacancy that occurs after a President’s death, as had happened when Kennedy was murdered, in 1963; Lyndon Johnson had been without a Vice-President until after the 1964 election. The amendment let a President appoint a Vice-President, though only with a majority vote in both houses of Congress. (This rule was first applied in 1973, when President Richard Nixon nominated Gerald Ford to replace Vice-President Spiro T. Agnew, who’d been forced to resign in a bribery scandal.) It even dealt with a President being briefly out of commission, as George W. Bush was in 2007, when he underwent a colonoscopy and transferred power to Vice-President Dick Cheney for the duration of the procedure.

The issue addressed by Eisenhower—the problem of transferring power to a Vice-President if a President is incapacitated, and of the President taking it back when he feels ready—was spelled out in Section 4. The machinery moves slowly: a Vice-President, with a majority of either the Cabinet or of Congress, may inform the Speaker of the House of Representatives and the president pro tempore of the Senate, in writing, that the President “is unable to discharge the powers and duties of his office.” In that case, the Vice-President takes over as “Acting President.” But if the President objects—declaring in writing “that no inability exists”—it gets complicated: then the Vice-President and a majority of the Cabinet, or of Congress, have to tell the Speaker and the president pro tem that the President can’t do his job. Then it’s up to Congress, which would have forty-eight hours to meet, twenty-one days to decide, and then to vote, by a two-thirds majority, on whether to give the President’s powers to the Vice-President—hurdles that would protect the Presidency from a seizure of power but, in case of a Strangelovian emergency, would be unrealistic.