A retired Air Force general told the Senate on Tuesday that an order from President Donald Trump or any of his successors to launch nuclear weapons can be refused by the top officer at U.S. Strategic Command if that order is determined to be illegal.

During testimony before the Foreign Relations Committee, retired Gen. Robert Kehler said the U.S. armed forces are obligated to follow legal orders, not illegal ones. Kehler, who served as the head of Strategic Command from January 2011 to November 2013, said the legal principles of military necessity, distinction and proportionality also apply to decisions about nuclear weapons use. The command would control nuclear forces in a war.

Sen. Ben Cardin of Maryland, the committee's top ranking Democrat, asked Kehler if that means Strategic Command can deny the president's order if it fails the test of proportionality and legality.

"Yes," Kehler responded, adding such a situation would lead to a "very difficult conversation." It might prompt a president to put a new general in charge to carry out his order, said Brian McKeon, a former acting undersecretary of defense for policy during the Obama administration, who testified alongside Kehler.

Bruce Blair, a former nuclear missile launch officer and a co-founder of Global Zero, an international movement for the elimination of nuclear weapons, said that even if a four-star commander of nuclear forces believed a presidential launch order to be illegal, he could not stop it because the order goes to him and to launch crews in the field simultaneously. The commander could try to override the order by sending a launch termination order, Blair said.

"But it would be too late," he said.

The hearing comes 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.

"Let me pull back the cover for a minute from this hearing," said Sen. Chris Murphy, D-Conn., a consistently vocal critic of Trump. "We are concerned that the president of the United States is so unstable, is so volatile, has a decision-making process that is quixotic, that he might order a nuclear weapons strike that is wildly out of step with U.S. national security interests."

But if a president's order to fire nuclear weapons, even pre-emptively, is determined to be sound and legal, there's no one who can stop him.

Not the Congress. Not his secretary of defense. And by design, not the military officers who would be duty-bound to execute the order.

As then-Vice President Dick Cheney explained in December 2008, the president "could launch a kind of devastating attack the world's never seen. He doesn't have to check with anybody. He doesn't have to call the Congress. He doesn't have to check with the courts."

And the world has changed even more in the decade since, with North Korea posing a bigger and more immediate nuclear threat than had seemed possible. The nature of the U.S. political world has changed, too, and Trump's opponents — even within his own party — question whether he has too much power over nuclear weapons.

Some aspects of presidential nuclear war-making powers are secret and therefore not well understood by the public. The system is built for fast decision-making, not debate. That's because speed is seen as essential in a crisis with a nuclear peer like Russia. Unlike North Korea, Russia has enough nuclear weapons to destroy the U.S. in minutes.

Russia's long-range missiles could reach the U.S. in about 30 minutes. Submarine-launched missiles fired from nearer U.S. shores might arrive in half that time. Given that some of the U.S. response time would be taken up by administrative steps, the president would have less than 10 minutes to absorb the information, review his options and make his decision, according to a December 2016 report by nuclear arms specialist Amy Woolf of the Congressional Research Service.

A president who decided to launch a nuclear attack — either in retaliation for a nuclear strike or in anticipation of one — would first hold an emergency conference with the defense secretary, the Joint Chiefs of Staff chairman and other advisers. The commander of U.S. Strategic Command, now Air Force Gen. John Hyten, would brief the president on strike options, and the president would make his decision.

The president would communicate his decision and transmit his authorization through a device called the nuclear football, a suitcase carried by a military aide. It's equipped with communication tools and a book with prepared war plans.

If the president decided to order a strike, he would identify himself to military officials at the Pentagon with codes unique to him. These codes are recorded on a card known as the biscuit that is carried by the president at all times. He would then transmit the launch order to the Pentagon and Strategic Command.

Blair, the former missile launch officer, said there is no way to reverse the president's order. And there would be no recalling missiles once launched.