North Korea says it has successfully carried out its fifth nuclear test, in continued defiance of UN resolutions.
A 5.3 magnitude tremor had earlier been detected near its nuclear test site.
South Korea believes it is the North's biggest-ever test, raising fears it has made significant nuclear advances.
South Korean President Park Geun-hye called it an act of "self-destruction" showing the "maniacal recklessness" of leader Kim Jong-un. The US warned of "serious consequences".
China's foreign ministry said Beijing was resolutely opposed to the test and urged North Korea to avoid further action that would worsen the situation.
North Korea is banned by the UN from any tests of nuclear or missile technology and has been hit by five sets of UN sanctions since its first test in 2006.
The North said the latest test had been of a "nuclear warhead that has been standardised to be able to be mounted on strategic ballistic rockets".
Estimates of the explosive yield of the latest blast have varied. South Korea's military said it was about 10 kilotonnes, enough to make it the North's "strongest nuclear test ever". Other experts say initial indications suggest 20 kilotonnes or more.
The bomb dropped by the US on Hiroshima in 1945 had a yield of about 15 kilotonnes.
Park, who is cutting short an overseas visit, said the test was a "grave challenge" to the international community that would "only earn more sanctions and isolation" for North Korea.
"Such provocation will further accelerate its path to self-destruction," she said.
Japan's Prime Minister Shinzo Abe said his country "absolutely cannot condone" any such test and would "protest adamantly" to Pyongyang.
"North Korea's nuclear development is becoming a graver threat to Japan's safety and severely undermines the peace and safety of the region and the international community," he said.
The White House said President Barack Obama had spoken to both Ms Park and Mr Abe after the latest test.
A statement from press secretary Josh Earnest said Mr Obama had "reiterated the unbreakable US commitment to the security of our allies in Asia and around the world".
(BBC)