WASHINGTON — It’s hard to overstate how thoroughly the U.S. military has prepared for doomsday — the day America gets into a nuclear shooting war.

No detail seems to have been overlooked. There’s even a designated “safe escape” door at the nuclear-warfighting headquarters near Omaha, Nebraska, through which the four-star commander would rush to a getaway plane moments before the first bomb hit.

Procedures are in place for ensuring U.S. nuclear weapons are ready for a presidential launch order in response to — or in anticipation of — a nuclear attack by North Korea or anyone else. There are backup procedures and backups for the backups.

And yet fundamental aspects of this nightmare sequence remain a mystery.

For example, what would happen if an American president ordered a nuclear strike, for whatever reason, and the four-star general at Strategic Command balked or refused, believing it to be illegal?

Robert Kehler, a retired general who once led that command, was asked this at a congressional hearing last week. His response: “You’d be in a very interesting constitutional situation.”

By interesting, he seemed to mean puzzling.

Brian McKeon, a senior policy adviser in the Pentagon during the Obama administration, said a president’s first recourse would be to tell the defense secretary to order the reluctant commander to execute the launch order.

“And then, if the commander still resisted,” McKeon said as rubbed his chin, “you either get a new secretary of defense or get a new commander.” The implication is that one way or another, the commander in chief would not be thwarted.

The current head of Strategic Command, Gen. John Hyten, said Saturday at the Halifax International Security Forum in Canada that he would refuse a launch order from a president if he believed that order to be illegal. Hyten also predicted that the president would then ask him for options that Hyten judged to be legal.

Bruce Blair, a former nuclear missile launch officer and co-founder of the Global Zero group that advocates eliminating nuclear weapons, said the Kehler scenario misses a more important point: The Strategic Command chief might, in effect, be bypassed by the president.

A president can transmit his nuclear attack order directly to a Pentagon war room, Blair said. From there it would go to the men and women who would turn the launch keys.

The renewed attention on these questions reflects unease — justified or not — about President Donald Trump’s temperament and whether he would act impulsively in a crisis.

This past week’s Senate hearing was the first in Congress on presidential authority to use nuclear weapons since 1976, when a Democratic congressman from New York, Richard L. Ottinger, pushed for the U.S. to declare it would never initiate a nuclear war. Ottinger said he wanted to “eliminate the prospect that human ignorance and potential human failure in the use of nuclear materials, especially nuclear weapons, will lead to the destruction of civilization.”

Forty-one years later, the U.S. hasn’t ruled out first-strike nuclear options and is unlikely to do so during Trump’s tenure. This troubles experts who worry about a president with the sole — some say unchecked — authority to initiate nuclear war.

“We are concerned that the president of the United States is so unstable, is so volatile, has a decision-making process that is so quixotic, that he might order a nuclear weapons strike that is wildly out of step with U.S. national security interests,” said Sen. Chris Murphy, D-Conn., at the outset of last week’s hearing.

The committee chairman, Sen. Bob Corker, R-Tenn., said he was not targeting Trump. But he, too, has publicly questioned whether Trump’s aggressive rhetoric toward North Korea and other countries could lead the U.S. into a world war. In the end, Corker’s hearing produced little impetus for legislation to alter the presidential authorities.

James Acton, co-director of the nuclear policy program at the Carnegie Endowment for International Peace, saw politics at play.

“But I think it’s a genuinely important subject, and I think it’s one we should be debating irrespective of who the president is,” he said.

Acton said a president rightly has unchecked authority to use nuclear weapons in response to an actual or imminent nuclear attack. In his view, the president should otherwise be required to consult in advance with the secretaries of state and defense, and the attorney general, and get approval from two of the three before acting.

Matthew Waxman, a professor at Columbia Law School, says changes of this sort would put a valuable check on the president and protect his nuclear authority from potential military insubordination.

Waxman and Richard Betts, director of the Saltzman Institute of War and Peace Studies at Columbia University, have a proposal: To order a nuclear first strike, the president would first have to get “certification” from the secretary of defense that the order is valid and authentic, and from the attorney general that it is legal.

These added safeguards wouldn’t risk delaying a response to an enemy attack in progress, Betts said. They would apply “only in situations where the United States is considering starting the nuclear war.”