The U.S. Pacific Fleet commander said Thursday he would launch a nuclear strike against China next week if President Donald Trump ordered it, and warned against the military ever shifting its allegiance from its commander in chief.

Adm. Scott Swift was addressing an Australian National University security conference following a major joint U.S.- Australian military exercise off the Australian coast. The drills were monitored by a Chinese intelligence-gathering ship off northeast Australia.

Asked by an academic in the audience whether he would make a nuclear attack on China next week if Trump ordered it, Swift replied: “The answer would be yes.”

Every member of the U.S. military had sworn an oath to obey the president as the commander in chief, Swift said.

“This is core to the American democracy and any time you have a military that is moving away from a focus and an allegiance to civilian control, then we really have a significant problem,” Swift said.

The biennial Talisman Saber exercise involved 36 warships including the aircraft carrier USS Ronald Reagan, 220 aircraft and 33,000 military personnel.

It was monitored by a Chinese People’s Liberation Army-Navy Type 815 Dongdiao-class auxiliary general intelligence vessel from within Australia’s 200-mile exclusive economic zone.