North Korea conducted its fifth nuclear test on Friday, setting off a blast that was more powerful than the bomb dropped on Hiroshima, and said it had mastered the ability to mount a warhead on a ballistic missile.
Its most powerful explosion to date follows a test in January that prompted the UN Security Council to impose tightened sanctions that increased North Korea's isolation but failed to prevent it from accelerating weapons development.
South Korean President Park Geun-hye, in Laos after a summit of Asian leaders ended there on Thursday, said North Korean leader Kim Jong Un was showing "maniacal recklessness" in completely ignoring the world's call to abandon his pursuit of nuclear weapons.
U.S. President Barack Obama, aboard Air Force One on his way home from Laos, said the test would be met with "serious consequences" and held talks with Park and with Japanese Prime Minister Shinzo Abe, the White House said.
China, North Korea's only major diplomatic ally, said it was resolutely opposed to the test and urged Pyongyang to stop taking any actions that would worsen the situation.
North Korea, which labels the South and the United States as its main enemies, said its "scientists and technicians carried out a nuclear explosion test for the judgment of the power of a nuclear warhead," according to a report from its official KCNA news agency.
North Korea said the test proved it is capable of mounting a nuclear warhead on a medium-range ballistic missile, which it last tested on Monday when Obama and other world leaders were gathered in China for a G20 summit.
Its claims of being able to miniaturise a nuclear warhead have never been independently verified.
North Korea has been testing missiles at an unprecedented rate this year, and the capability to mount a nuclear warhead on a missile is especially worrisome for its neighbours South Korea and Japan.
"The standardisation of the nuclear warhead will enable the DPRK to produce at will and as many as it wants a variety of smaller, lighter and diversified nuclear warheads of higher strike power," KCNA said, referring to the country's formal name, the Democratic People's Republic of Korea.
Japan Defence Minister Tomomi Inada said the Pyongyang regime's advances in mobile ballistic missile technology posed a grave threat to Japan.
North Korea's nuclear test coincided with the anniversary of its 1948 foundation as a republic.
Its continued testing despite sanctions presents a severe challenge to Obama in the final months of his presidency and could become a factor in the U.S. presidential election in November.
"Sanctions have already been imposed on almost everything possible, so the policy is at an impasse," said Tadashi Kimiya, a University of Tokyo professor specialising in Korean issues.
"In reality, the means by which the United States, South Korea and Japan can put pressure on North Korea have reached their limits," he said.
Japan's Abe said such a nuclear test could not be tolerated. Japan's foreign minister lodged a protest and Tokyo also sent two military jets to begin measuring for radiation.
China's environment ministry began emergency radiation monitoring along its borders with North Korea in northeast China, state television reported.
Jeffrey Lewis of the California-based Middlebury Institute of International Studies said the highest estimates of seismic magnitude suggested this was the most powerful nuclear test conducted by North Korea so far.
He said the seismic magnitude and surface level indicated a blast with a 20- to 30-kilotonne yield. Such a yield would make this test larger than the nuclear bomb dropped by the United States on the Japanese city of Hiroshima in World War Two and potentially bigger than that dropped on Nagasaki soon after.
"That's the largest DPRK test to date, 20-30kt, at least. Not a happy day," Lewis told Reuters.
"The important thing is that five tests in, they now have a lot of nuclear test experience. They aren't a backwards state anymore," he said.