The claim: US military personnel could resist President Trump if he ordered an illegal nuclear strike.

Reality Check verdict: Although normally nobody is allowed to refuse the president's order, in practice, generals would expect a good explanation for the strike - and would be obliged to say "no" to an illegal order.

In recent months, with tensions rising between the US and North Korea, people have been asking what's to stop President Trump launching nuclear weapons.

A retired general told Congress that the military may be able to say "no" to the President, under certain circumstances.

Now, Gen John Hyten, who leads US Strategic Command, has told the Halifax International Security Forum that he would advise against a strike if he considered it was illegal.

But is anyone allowed to say "no" to the president if he orders a nuclear strike?

Access codes

If President Trump wanted to fire nuclear weapons, he could first discuss a range of options with his advisers.

He'd then issue an order to top military officials at the Pentagon.

They would confirm the president's identity by exchanging codes printed on a card called the "biscuit", which the president carries wherever he goes.

The order would pass to US Strategic Command, which would then send further instructions and access codes to crews on the ground (or, perhaps, underwater in a submarine.)

Those crews would then launch the missiles.

The BBC's Inquiry podcast covered the practicalities of launching a nuclear strike in much more detail.

Is there anyone, at any of those stages, who'd be allowed to say "no" to the president?

Chain of command

A briefing from the Congressional Research Service makes the legal situation plain. "The US president has sole authority to authorise the use of US nuclear weapons."

Ordinarily, nobody is allowed to over-rule the president's decision - it's part of his role as Commander-in-Chief.

In theory, the vice-president could oust the president if a majority of the cabinet agreed that the president was unfit to serve.

In practice, that would be difficult to organise in time to stop the president launching nuclear weapons.

But Peter Feaver, professor of political science at Duke University in North Carolina, says it's not true that President Trump could launch a nuclear strike as easily as he could fire off a tweet.

"The president is giving an order which is transmitted down a chain of command. Someone further down that chain of command turns the key or presses the button."

Image copyright AFP Image caption Inside this briefcase, the nuclear codes. To use them, the president would have to speak with the Pentagon.

Prof Feaver says that if the president went to the military to order a strike, this would trigger a "consultation process" - generals wanting to know what the president was trying to achieve, why the president wanted to use nuclear weapons and so on.

President Trump would have the legal authority to order the strike all the same, against any advice he receives.

But he'd still need to persuade the military to carry that order out.

Legal orders

Gen Hyten argued that if a nuclear order was illegal, he wouldn't carry it out.

"If you execute an unlawful order, you will go to jail. You could go to jail for the rest of your life."

What would make a nuclear order unlawful?

Some argue that all uses of nuclear weapons would be unlawful.

But even if you dispute that, there may be certain circumstances where it would be illegal to fire nuclear weapons.

Anthony Colangelo, professor of law at the Southern Methodist University in Dallas, argues that certain kinds of nuclear strikes could break international humanitarian law.

International humanitarian law governs how countries must behave when at war. It comes from treaties the US has signed, such as the Geneva Conventions, but also from custom and case law, too.

You might break the law by using nuclear weapons when conventional weapons could achieve the same objective or by using nuclear weapons somewhere where they would kill combatants and civilians indiscriminately.

Image copyright Getty Images Image caption The attacks on Nagasaki and Hiroshima in 1945 are the only precedents for the human devastation caused by using nuclear weapons.

This isn't just Prof Colangelo's opinion. The US Department of Defense acknowledges in its law manual that "the law of war governs the use of nuclear weapons".

Prof Colangelo says the responsibility to obey the law "runs from the top down - right down to the crew member on the submarine".

If the president orders an illegal strike, anyone who carries out that order is potentially liable for war crimes.

They'd have a duty to say "no".

Would officers disobey?

Not everyone is equally able to spot an illegal order, though.

The submarine crews, for example, won't have access to all the information that the president and his top military officials do. They might not be in a position to tell whether an order is legal.

And Prof Colangelo points out it might not be a good thing to encourage those crew members to question any order that comes their way. "The entire structure of military command would crumble if subordinates started second-guessing orders."

Image copyright Getty Images Image caption Gen John Hyten has said he would refuse to carry out an illegal order.

If a general said "no" to the president, he could of course fire that general. But their replacement would be equally obliged to obey the law.

Read more from Reality Check

Follow us on Twitter