The United States warned Sunday it could launch a "massive military response" to threats from North Korea following Pyongyang's provocative detonation of what it claimed was a miniaturized hydrogen bomb.
Trump had earlier denounced the test, saying the time for "appeasement" was over and threatening drastic economic sanctions, including "stopping all trade with any country doing business with North Korea."
Mattis went further still, telling North Korean leader Kim Jong-Un: "Any threat to the United States or its territories, including Guam, or our allies will be met with a massive military response, a response both effective and overwhelming.
"We are not looking to the total annihilation of a country, namely North Korea. But as I said, we have many options to do so," he added.
The US monitors measured a powerful 6.3-magnitude earthquake near the North's main testing site, with an aftershock possibly caused by the collapse of a tunnel at the site.
The resultant shock caused momentary panic in parts of China -- and Trump slammed it as "very hostile and dangerous to the United States."
- 'Unprecedentedly large' -
North Korea said the test of what it described as a hydrogen bomb designed for a long-range missile was "a perfect success."
Pyongyang residents celebrated as a jubilant television newsreader hailed the "unprecedentedly large" blast; she said it had moved the country closer to "the final goal of completing the state nuclear force."
International condemnation of North Korea's sixth nuclear test was swift and strong, including from neighboring China. South Korean President Moon Jae-In, once an advocate of dialogue with the North, called for the "strongest punishment."
Russian President Vladimir Putin said the test "torpedoes the global non-proliferation regime, violates UN Security Council resolutions" and threatens regional peace, while adding, in a phone call to Japanese Prime Minister Shinzo Abe, that the crisis "should be resolved only by political and diplomatic means."
And UN Secretary General Antonio Guterres condemned the test as "profoundly destabilizing," while the Security Council will hold an emergency meeting on Monday.
Trump in a tweet branded the North "a rogue nation which has become a great threat and embarrassment to China."
He has repeatedly insisted that Beijing lean on its isolated neighbor to halt its nuclear and missile development.
On Sunday, however, the US president also aimed criticism at Seoul.
South Korea, Trump said, "is finding, as I have told them, that their talk of appeasement with North Korea will not work, they only understand one thing!"
Later Sunday, a reporter shouted a question as Trump was leaving a church in Washington, asking whether he planned to attack North Korea. The president replied, "We'll see."
- 'Cut off North Korea' -
Hours before the test, the North released /images of Kim at his country's Nuclear Weapons Institute, inspecting what it said was a miniaturized H-bomb that could be fitted onto an intercontinental ballistic missile (ICBM).
The device was a "thermonuclear weapon with super explosive power" entirely made "by our own efforts and technology," the Korean Central News Agency cited Kim as saying.
A series of US and United Nations-backed sanctions seem to have had little effect on Pyongyang.
But US Treasury Secretary Steven Mnuchin said Sunday his department was preparing potent new measures that would "cut off North Korea economically."
"I'm going to draft a sanctions package and send it to the president for his strong consideration that anybody that wants to do trade or business with them will be prevented from doing trade or business with us," Mnuchin said on "Fox News Sunday."
While the United States has virtually no trade with the North, the burden of sanctions such as Mnuchin described would fall heavily on China, which buys about 90 percent of North Korean exports.
In Seoul, President Moon Jae-In called for new United Nations sanctions to "completely isolate North Korea." He said the South would discuss deploying "the strongest strategic assets of the US military" -- a possible reference to tactical nuclear weapons, which the US withdrew from South Korea in 1991.
- Tremor felt in China, Russia -
While US Secretary of State Rex Tillerson spoke by phone with his Asian counterparts, US and South Korean military chiefs also conferred.
Seoul's defense ministry said the respective chairmen of the joint chiefs of staff -- General Jeong Kyeong-Doo and General Joseph Dunford -- had "agreed to prepare a South Korea-US military counteraction and to put it into action at the earliest date."
South Korean experts said the tremor near the North's main test site was five to six times stronger than that from a 10-kiloton test a year ago.
Pyongyang raised tensions in July with two successful tests of an ICBM which apparently brought much of the US mainland within range.
Last week it fired a missile over Japan.
Jeffrey Lewis of website armscontrolwonk said Sunday's blast clearly was "a staged thermonuclear weapon," representing a significant advance.
Trump has warned Pyongyang that it faces "fire and fury" and that Washington's weapons are "locked and loaded."
But even some Trump advisers say US military options are limited when Pyongyang has the capacity to quickly wipe out much of the South Korean capital Seoul.
Analysts believe Pyongyang's weapons program is aimed both at self-defense and strengthening its hand in any negotiations with the US.
"North Korea will continue with their nuclear weapons program unless the US proposes talks," Koo Kab-Woo of Seoul's University of North Korean Studies said.