North Korea on Tuesday staged its most powerful nuclear test yet, claiming a breakthrough with a "miniaturised" device in a striking act of defiance that was condemned by global powers including its sole patron China.
The isolated state said its third underground test, after previous detonations in 2006 and 2009 that triggered a raft of UN sanctions, was a direct riposte to US "hostility".
The claim that it involved a "miniaturised and lighter" device will be of particular concern, suggesting it is a step closer to fitting a nuclear warhead onto a ballistic missile following its successful launch of a long-range rocket in December.
Confirmation of the test from the North's state media came nearly three hours after seismic monitors detected an unusual tremor at 0257 GMT in the area of the Punggye-ri nuclear test site in the northeast.
Analysts said the timing appeared to be an attention-grabbing calculation from a state well versed in provocative acts, coming just ahead of US President Barack Obama's State of the Union address at the start of his second term.
Obama denounced the test and called for a "swift" and "credible" international response, as the UN Security Council readied to meet in emergency session.
China, whose trade and aid are a life-support to impoverished North Korea, expressed "firm opposition" to the nuclear test and noted that it came "despite widespread opposition from the international community".
"We strongly urge the DPRK (North Korea) to honour its commitment to denuclearisation, and not to take any actions which might worsen the situation," the foreign ministry said in a statement.
Reaction was swift from neighbours Japan and South Korea, who stressed the threat to regional and their own national security.
Russia, NATO and the European Union all condemned the test as illegal and a flagrant violation of UN resolutions.
The UN Security Council was expected to debate new measures when it meets on Tuesday morning in New York. The United States and its allies will push hard for China to get tough with its erratic ally and ramp up existing sanctions.
But China's leverage is limited, observers say, by its fear of a North Korean collapse and the prospect of a reunified, US-allied Korea directly on its border.
It was the North's first nuclear test since its new, youthful leader Kim Jong-Un took over from his father, Kim Jong-Il. Security analysts said it sent an unequivocal message of intent following December's rocket launch.
"The launch and the test are empirical evidence that Kim and his regime have no intention of negotiating away the North's nuclear programme any time soon," said Paul Carroll, programme director at the US-based Ploughshares Fund.
South Korea's spy agency warned that Pyongyang might further up the ante by conducting another nuclear test or a ballistic missile launch in coming days or weeks.
On a technical level experts will be hungry to know if North Korea has switched from plutonium to a new and self-sustaining nuclear weaponisation programme using uranium.
The KCNA statement did not specify what fissile material was used, but noted that the test's success had provided the North with a "diversified" nuclear deterrent.
The North has substantial deposits of uranium ore and it is much easier to secretly enrich uranium, which can be done with centrifuges rather than the nuclear reactor required for plutonium enrichment.
Tuesday's explosion had a yield of six to seven kilotons, said South Korean defence ministry spokesman Kim Min-Seok, significantly more than the 2006 and 2009 tests which both used plutonium.
The explosive yield compared with 15 kilotons in the world's first atomic bomb dropped by the United States on Hiroshima in 1945.
North Korea's first test yielded less than one kiloton and was widely seen as a dud. The second test yielded between two and six kilotons, according to Seoul.
The third test throws down a stark security and diplomatic challenge to Obama as well as to new Chinese leader Xi Jinping.
Paik Hak-Soon, a North Korea expert at the Sejong Institute in Seoul, said Kim Jong-Un was intent on triggering a crisis that would force the international community to negotiate on his terms.
"The UN is running out of options and probably knows new sanctions would only have a limited impact," Paik said.
"The only real option for curbing further provocation is starting a dialogue with the North, but that will be very difficult given the domestic political pressure on leaders in the US, South Korea and Japan."