SEOUL — North Korea on Sunday conducted its sixth and most powerful nuclear test, which it said was of an advanced hydrogen bomb for a long-range missile, marking a dramatic escalation of the regime’s stand-off with the United States and its allies.

Washington responded aggressively, with President Donald Trump refusing to rule out military action and threatening to cut off trade with any country doing business with Pyongyang.

Asked while leaving a church service whether the United States would attack North Korea, Trump replied: “We’ll see.”

The White House said Trump would convene a meeting of his national security advisers later on Sunday.

Trump’s trade threat, issued via Twitter, may be a way to pressure China, Pyongyang’s top trading partner. The president also appeared to rebuke ally South Korea, which faces an existential threat from North Korea’s nuclear program.

“South Korea is finding, as I have told them, that their talk of appeasement with North Korea will not work, they only understand one thing!” Trump said in an early morning tweet.

Trump appeared to be blaming South Korea for a policy it abandoned years ago of trying to soften North Korea’s posture through economic aid.

South Korea’s new president, Moon Jae-in, has argued for continuing dialogue with its neighbor over its nuclear program, while also supporting international sanctions.

Reports that the United States is considering pulling out of its trade deal with South Korea also has ratcheted up tensions with the country.

A former senior State Department official criticized Trump for accusing South Korea of appeasement.

“It was unseemly, unhelpful, and divisive to gratuitously slap our major ally at the very moment when the threat from [North Korea] has reached a new height,” said the official, who spoke on condition of anonymity.

Chinese President Xi Jinping and Russian President Vladimir Putin, who met on the sidelines of a BRICS summit in China, agreed to “appropriately deal” with North Korea’s nuclear test, the Xinhua news agency reported.

Hours before the test, Trump had talked by phone with Japanese Prime Minister Shinzo Abe about the “escalating” nuclear crisis in the region.

The U.S. president has previously vowed to stop North Korea developing nuclear weapons and said he would unleash “ fire and fury” on the country if it threatened U.S. territory. North Korea then threatened to launch missiles into the sea near the strategically located U.S. Pacific territory of Guam.

Last week, Trump said the time for talking was over after North Korea on Tuesday launched an intermediate-range ballistic missile over Japan, although Defense Secretary James Mattis later contradicted him, saying the United States had not exhausted all diplomatic options.

Trump’s tweet on Sunday, however, again suggested that he favors a non-diplomatic approach. The question now is whether advisers like Mattis and Secretary of State Rex Tillerson can persuade him not to rule out diplomacy.

North Korea, which carries out its nuclear and missile programs in defiance of United Nations Security Council resolutions and sanctions, said on state television that the hydrogen bomb test ordered by leader Kim Jong Un had been a “perfect success.”

The bomb was designed to be mounted on its newly developed intercontinental ballistic missile, or ICBM, the North said.

The test had registered with international seismic agencies as a manmade earthquake near a test site. Japanese and South Korean officials said the tremor was about 10 times more powerful than the one picked up after North Korea’s last nuclear test a year ago.

There was no independent confirmation that the detonation was a hydrogen bomb rather than a less powerful atomic device, but Japanese Chief Cabinet Secretary Yoshihide Suga said Tokyo could not rule out such a possibility.

Experts who studied the impact of the earthquake, which the U.S. Geological Survey measured at magnitude 6.3, said there was enough strong evidence to suggest the reclusive state has either developed a hydrogen bomb or was getting very close.

The head of the United Nations’ nuclear watchdog, IAEA Director General Yukiya Amano, said the nuclear test was “an extremely regrettable act” that was “in complete disregard of the repeated demands of the international community.”

South Korean President Moon said Seoul would push for strong steps to further isolate the North, including new U.N. sanctions. Japan also raised the prospect of further sanctions, saying curbs on North Korea’s oil trade would be on the table.

China, North Korea’s sole major ally, said it strongly condemned the nuclear test and urged Pyongyang to stop its “wrong” actions.

The United States has repeatedly urged China to do more to rein in its neighbor, but Beijing has lambasted the West and its allies in recent weeks for suggesting that it is solely responsible for doing so. It has said military drills by South Korea and the United States on the Korean peninsula have done nothing to lessen tensions.

Thermonuclear device?

Under third-generation leader Kim, North Korea has been pursuing a nuclear device small and light enough to fit on a long-range ballistic missile, without affecting its range and making it capable of surviving re-entry.

The test comes amid heightened regional tension following Pyongyang’s two tests of ICBMs in July that potentially could fly about 6,200 miles, putting many parts of the U.S. mainland within range.

Kune Y. Suh, a nuclear engineering professor at Seoul National University, said the size of Sunday’s detonation meant it might be a hydrogen bomb test.

“The power is 10 or 20 times or even more than previous ones,” Suh said. “That scale is to the level where anyone can say [it was] a hydrogen bomb test.”

During the test, people in the Chinese city of Yanji on the North Korean border said they felt a tremor that lasted roughly 10 seconds, followed by an aftershock.

“I was eating brunch just over the border here in Yanji when we felt the whole building shake,” said Michael Spavor, director of the Paektu Cultural Exchange, which promotes business and cultural ties with North Korea. “It lasted for about five seconds. The city air raid sirens started going off.”

Harry Kazianis, director of defense studies at the conservative Center for the National Interest in Washington, said the latest test should not be a surprise.

“North Korea’s mission is quite clear when it comes to this latest atomic test: to develop a nuclear arsenal that can strike all of Asia and the U.S. homeland,” he said. “This test is just another step towards such a goal.”

Hourglass-shaped device

Hours before the test, North Korean state news agency KCNA had released pictures showing Kim Jong Un inspecting a silver-colored, hourglass-shaped warhead during a visit to the country’s nuclear weapons institute.

The shape shows a marked difference from pictures of the ball-shaped device North Korea released in March last year, and appears to indicate the appearance of a two-stage thermonuclear weapon, said Lee Choon-geun, senior research fellow at state-run Science and Technology Policy Institute in Washington.

KCNA said North Korea “recently succeeded” in making a more advanced hydrogen bomb.

“All components of the H-bomb were homemade and all the processes … were put on the Juche basis, thus enabling the country to produce powerful nuclear weapons, as many as it wants,” KCNA quoted Kim as saying.

Juche is North Korea’s homegrown ideology of self-reliance that is a mix of Marxism and extreme nationalism preached by state founder Kim Il Sung, the current leader’s grandfather. It says its weapons programs are needed to counter U.S. aggression.

Impoverished North Korea and the rich, democratic South are technically still at war because their 1950-53 conflict ended in a truce, not a peace treaty. The North regularly threatens to destroy the South and its main ally, the United States.