U.S. Defence Secretary Jim Mattis on Sunday threatened a "massive military response" to any attack on the United States or its allies after North Korea conducted its most powerful nuclear test to date.

Speaking outside the White House, Mattis said: "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."

Mattis said Washington was not looking for the "total annihilation of a country, namely North Korea. But as I said, we have many options to do so."

North Korea conducted its sixth and most powerful nuclear test on Sunday — in violation of UN resolutions — which it said was an advanced hydrogen bomb for a long-range missile.

North Korea said in an announcement on state television that the test ordered by leader Kim Jong-un was a "perfect success."

Manmade earthquake

The announcement from Pyongyang came a few hours after international seismic agencies detected a manmade earthquake near the North's test site. Japanese and South Korean officials said it was around 10 times more powerful than the tremor picked up after its 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.

A worker arranges South Korean newspapers reporting about North Korea's hydrogen bomb test on Sunday. The bomb was designed to be mounted on its newly developed intercontinental ballistic missile (ICBM), the North said. (Ahn Young-joon/Associated Press)

But experts who studied the impact of the earthquake caused by the explosion — measured by the U.S. Geological Survey 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.

U.S. President Donald Trump, while leaving a church service in Washington, D.C., a day after visiting flood-ravaged Texas and Louisiana, said "we'll see" when asked whether the United States would attack North Korea.

Trump also said the U.S. is considering halting trade with "any country doing business with North Korea." On Twitter, he said that approach was under consideration, "in addition to other options."

Test a 'clear and present threat': Trudeau

Canadian Prime Minister Justin Trudeau was among world leaders also condemning the apparent North Korean nuclear test, calling it a "clear and present threat to the safety and security of its neighbours and the international community."

Prime Minster Justin Trudeau, pictured in Saskatoon on Friday, condemned North Korea's nuclear test, calling it a 'clear and present threat' to international security. (Liam Richards/Canadian Press)

"These continued provocations by North Korea's leadership, along with their profoundly dangerous push to develop nuclear weapons and test ballistic missiles near neighbouring countries, only serve to further isolate them," Trudeau said in a statement.

"We urge the UN Security Council to take further decisive action to effectively constrain North Korea's proliferation efforts, and call on all states to fully implement relevant UN sanctions."

UN Secretary General Antonio Guterres said North Korea's test claim was "profoundly destabilizing for regional security," and called on the country's leadership to cease such acts, his spokesperson said in a statement.

"This act is yet another serious breach of [North Korea's] international obligations and undermines international non-proliferation and disarmament efforts. This act is also profoundly destabilizing for regional security," UN spokesman Stephane Dujarric said.

U.S. Treasury Secretary Steven Mnuchin said Sunday he was putting together new sanctions seeking to cut off trade with North Korea. On Fox News Sunday, Mnuchin described Pyongyang's behavior as "completely unacceptable."

Trump is meeting with his national security team in the afternoon to discuss North Korea. The White House said the president's team is "monitoring this closely."

The bomb was designed to be mounted on its newly developed intercontinental ballistic missile (ICBM), the North said. The head of the UN's nuclear watchdog, Yukiya Amano, director general of the International Atomic Energy Agency, said the apparent test was "an extremely regrettable act" that was "in complete disregard of the repeated demands of the international community."

Trump criticizes China

In a string of tweets Sunday morning, Trump also criticized South Korea and China for their approach to North Korea. The United States has repeatedly urged Beijing to do more to rein in its neighbour.

North Korea has conducted a major Nuclear Test. Their words and actions continue to be very hostile and dangerous to the United States..... —@realDonaldTrump ..North Korea is a rogue nation which has become a great threat and embarrassment to China, which is trying to help but with little success. —@realDonaldTrump 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! —@realDonaldTrump

In the Chinese city of Yanji, on the border with North Korea, witnesses said they felt a tremor that lasted roughly 10 seconds, followed by an aftershock.

South Korean President Moon Jae-in said Seoul would push for strong steps to further isolate the North, including new UN 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.

Thermonuclear device?

North Korea claimed in January last year it had tested a miniaturized hydrogen bomb, also known as a thermonuclear device, but outside experts were sceptical, suggesting it could have been a "boosted device," an atomic bomb that uses some hydrogen isotopes to increase its explosive yield.

One expert said the size of Sunday's detonation meant it was possible it could be a hydrogen bomb test.

"The power is 10 or 20 times or even more than previous ones," said Kune Y. Suh, a nuclear engineering professor at Seoul National University. "That scale is to the level where anyone can say a hydrogen bomb test.

"North Korea has effectively established itself as a nuclear state. This is not just a game changer; it's a game over."