Experts generally agree that the world came closest to nuclear war during the Cuban Missile Crisis of 1962, when the U.S. and the U.S.S.R. faced off on the issue of Soviet ballistic missiles being installed just 90 miles away from the American mainland. In the end, President John F. Kennedy found a way to back away from the brink of disaster: he was rational enough to see the inevitable catastrophe that would have resulted from “pushing the button.”

But what if he hadn't been? Since the atomic bomb was first used against Japan in 1945, all U.S. presidents have had wide latitude to order a nuclear attack. And although we don't dwell on the fact, psychiatric and neurological disorders are not uncommon among people who ascend to the world's most powerful office. Lyndon B. Johnson and Richard M. Nixon displayed behavior suggestive of paranoia. Earlier, Abraham Lincoln showed signs of depression. In fact, the study of presidents from 1776 to 1974 found that nearly half the top office holders demonstrated signs of psychopathology. The potential for irrational decision-making cries out for limits on the power to destroy the world.

Which brings us to Donald Trump. Erratic behavior has been the norm during his presidency. Trump's order for the precipitous assassination of Iran's high-ranking officer Qassem Soleimani in January is only the most recent example. Shortly after he took office, Trump threatened North Korea's leader Kim Jong-un with “fire and fury like the world has never seen.” Then he turned around and declared that he and the dictator were “in love,” defending Kim even when the country continued to conduct missile tests. The full list of Trump's capricious behaviors would fill many pages. The American Psychiatric Association states that it is unethical to offer a professional opinion about someone before a thorough medical examination, but some psychiatrists have begun to argue that breaching the rule is justified in this case for the public good. And practitioners have followed through: hundreds of psychiatrists and medical professionals submitted a document to Congress last December stating that Trump's mental health was declining during the course of the impeachment proceedings.

A highly impulsive U.S. president should not be able to single-handedly start a global nuclear conflagration that could kill tens of millions of people. Trump himself might even agree. The self-styled “stable genius” tweeted in 2014: “The global warming we should be worried about is the global warming caused by NUCLEAR WEAPONS in the hands of crazy or incompetent leaders!”

He was right. Fortunately, there are a few possible solutions that may be brought to bear. Proposals have circulated to require either Congress or cabinet officials to give assent to any first use of nuclear weapons. And Section 4 of the 25th amendment to the Constitution can be invoked to determine whether a president is fit to continue serving in office.

The apocalyptic danger posed by an unstable president with his or her finger on the nuclear button would be moot if the world scrapped nuclear weapons entirely. Failing that, the most important measure the U.S. could take as the world's preeminent military power should be to pledge never to initiate a first strike—a promise we have never made despite lawmakers' efforts—signaling that our current nuclear arsenal serves solely as a deterrent. In tandem, given that the nuclear early-warning system activates every day, usually in response to a rocket launching somewhere on the globe, the U.S. should take nukes off their current launch-on-warning status to remove the pressure on any president to respond in minutes to what may well be a false alarm.

The legislation needed to enact any one of these measures may have to await a new administration and a shift away from the unprecedented partisanship that divides the U.S. political scene. Public fear of nukes appears to have abated somewhat from the time when every schoolchild had to practice duck-and-cover drills. Still, a hopeful sign of congressional willingness to implement a check on presidential power came from the massing of bipartisan Senate votes in response to the Soleimani killing to limit Trump's authority to take military action in Iran.

Whether Democrat or Republican, any post-Trump administration should prioritize nuclear de-escalation while maintaining security. My-button-is-bigger-than-yours tweets should be replaced with reminders of the joint statement made by Ronald Reagan and Soviet president Mikhail Gorbachev in 1987: “A nuclear war cannot be won and must never be fought.”