OTTAWA -  The general in command of US nuclear forces said Saturday that he would resist any "illegal" presidential order for a strike and work to find an alternative.

President Donald Trump's history of unpredictable and volatile behaviour has raised concerns that he could unilaterally order an unnecessary nuclear attack - an issue recently debated by members of the US Senate.

"We think about these things a lot. When you have this responsibility, how do you not think about it?" General John Hyten told the Halifax Security Forum in response to a question about the conversation he would have with the president on a potential strike. "I provide advice to the president, he'll tell me what to do."

Hyten heads US Strategic Command, which is responsible for American cyber capabilities and missile defence, in addition to nuclear weapons.

"If it's illegal... I'm gonna say, 'Mr President, that's illegal.' And guess what he's gonna do? He's gonna say, 'What would be legal?' And we'll come up with options, of a mix of capabilities, to respond to whatever the situation is," Hyten said. Trump issued an apocalyptic threat to unleash "fire and fury" on North Korea and began calling Kim Jong-Un "Rocket Man" after a series of provocative missile tests, while the hermit state's leader branded Trump a "dotard".

The escalating war of words has alarmed some US lawmakers, and senators debated the limits of a president's unilateral power to launch a nuclear attack earlier this week.

In the event of an ongoing or imminent nuclear attack, senators and expert witnesses agreed that the president had full authority to defend the nation, but experts said there was no strict definition of "imminent." As to what constitutes an illegal order, Hyten referred to the four key principles from the Law of Armed Conflict in his remarks. "The Law of Armed Conflict has certain principles - necessity, distinction, proportionality, unnecessary suffering - all those things are defined," said Hyten.

"If you execute an unlawful order, you will go to jail, you could go to jail for the rest of your life. It applies to nuclear weapons, it applies to small arms, it applies to small unit tactics, it applies to everything."

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 US armed forces are obligated to follow legal orders, not illegal ones.

According to CNN, at the Senate hearing this week, experts testified that the use of nuclear weapons must be proportional to a threat, and the Pentagon has extensive options for use of conventional weapons against North Korea.

Robert Kehler explained at the hearing that there are layers of safeguards within the current system designed to ensure any order is both legal and proportionally appropriate. "US nuclear forces operate under strict civilian control. Only the President of the United States can order the employment of US nuclear weapons," Kehler said.

"This is a system controlled by human beings ... nothing happens automatically," he said, adding that the US military does not blindly follow orders and a presidential order to employ nuclear weapons must be legal.

While the president retains constitutional authority to order some military action, Kehler explained that the nuclear decision process "includes assessment, review and consultation between the president and key civilian and military leaders, followed by transmission and implementation of any presidential decision by the forces themselves." "If there is an illegal order presented to the military, the military is obligated to refuse to follow it," he said.

Members of the Senate Foreign Affairs Committee called into question a decades-old presidential authority to deploy nuclear weapons. "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 US national security interests," said US Senator Chris Murphy.

Republican members of the committee were less blunt in their criticism of Trump's judgment but did seek assurances that there are legal and strategic oversight measures in place to prevent the rash use of nuclear weapons.

Ultimately, some of those who testified warned against legislative changes to rein in the president's authority to exercise nuclear authority.

Brian McKeon, who served as principal deputy undersecretary of defence for policy in the Obama administration, told the committee: "I think hard cases make bad law, and I think if we were to change the decision-making process in some way because of a distrust of this president, I think that would be an unfortunate precedent."