HALIFAX, Nova Scotia — The top officer at U.S. Strategic Command said Saturday an order from President Donald Trump or any of his successors to launch nuclear weapons can be refused if that order is determined to be illegal.

Air Force Gen. John Hyten, commander of Strategic Command, told a panel at the Halifax International Security Forum on Saturday that he and Trump have had conversations about such a scenario and that he would tell Trump he couldn't carry out an illegal strike.

"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?'" Hyten said.

"And we'll come up with options with a mix of capabilities to respond to whatever the situation is, and that's the way it works."

In the event that Trump decided to launch a nuclear attack, Hyten would provide him with strike options that are legal.

The command would control nuclear forces in a war.

The comments come as the threat of nuclear attack from North Korea remains a serious concern and Trump's critics question his temperament. Trump's taunting tweets aimed at Pyongyang have sparked concerns primarily among congressional Democrats that he may be inciting a war with North Korea.

During testimony before the Foreign Relations Committee earlier this month, retired Gen. Robert Kehler who served as the head of Strategic Command from January 2011 to November 2013, also said the U.S. armed forces are obligated to follow legal orders, not illegal ones.

Hyten said he's talked it over with Trump.

"I think some people think we're stupid. We're not stupid people. We think about these things a lot. When you have this responsibility how do you not think about it?" he said.

He said he would not obey an illegal order.

"You could go to jail for the rest of your life," he said.