Just a day after the U.S.’s top nuclear commander said he would resist President Trump’s order if he called for an “illegal” nuclear launch, a fiery debate emerged about the president’s authority to order the firing of a warhead.

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.

Air Force General John Hyten, commander of the U.S. Strategic Command (STRATCOM), started the debate when he told an audience at the Halifax International Security Forum in Nova Scotia, Canada that he had thought a lot about what to say if he received such an order.

“And if it’s illegal, guess what’s going to happen? I‘m going to say, ‘Mr. President, that’s illegal.’ And guess what he’s going to do? He’s going to say, ‘What would be legal?’ And we’ll come up with options, of a mix of capabilities to respond to whatever the situation is, and that’s the way it works. It’s not that complicated.”

Hyten said running through scenarios of how to react in the event of an illegal order was standard practice, and added: “If you execute an unlawful order, you will go to jail. You could go to jail for the rest of your life.”

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.

Bruce Blair, a former nuclear missile launch officer and co-founder of the Global Zero group that advocates eliminating nuclear weapons, said 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 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.

The committee chairman, Sen. Bob Corker, R-Tenn., said he was not targeting Trump. But he 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.

The Associated Press contributed to this report