The top nuclear commander in the US says he would resist any "illegal" presidential order to launch a strike.
Air Force Gen John Hyten, said as head of the US Strategic Command he provided advice to a president and expected that a legal alternative would be found.
His comments come just days after US senators discussed a president's authority to launch a nuclear attack.
Some of them expressed concern that President Donald Trump might irresponsibly order such a strike.
Others though said a president must have the authority to act without meddling from lawyers. It was the first such hearing in more than 40 years.
In August, Mr Trump vowed to unleash "fire and fury like the world has never seen" on North Korea if it continued to expand its atomic weapons programme and threaten America.
Last month, the Senate Foreign Relations Committee's Republican chairman, Senator Bob Corker, accused the president of setting the US "on a path to World War Three".
Speaking at the Halifax International Security Forum in Canada, Gen Hyten said: "We think about these things a lot.When you have this responsibility, how do you not think about it?"
"I provide advice to the president, he will tell me what to do," he said.
"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," Gen Hyten added.
He also added: "If you execute an unlawful order, you will go to jail. You could go to jail for the rest of your life."
President Trump has not publicly commented on Gen Hyten's remarks.