The announcement on state media came hours after a huge seismic event was detected near its nuclear test site.
South Korea believes it is the North’s biggest ever test, raising fears the state has made real nuclear advances.
South Korean President Park Geun-hye called it an act of “self-destruction” which showed the “maniacal recklessness” of leader Kim Jong-un.
The North said the test had been of a “newly developed nuclear warhead” and that it was now capable of mounting a nuclear device on ballistic rockets.
South Korea’s military has suggested that the explosive yield of this blast could be almost twice that of the previous nuclear test. Analysts have expressed fears this could mean the North is a step closer to having a useable nuclear weapon.
Ms Park, who is cutting short an overseas visit, said the test was a “grave challenge” to the international community which 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 test was first detected as a 5.3 magnitude earthquake on Friday morning in north-east North Korea, close to its Punggye-ri underground nuclear test site.
As with previous nuclear tests, the waveform generated indicated it had not been naturally occurring, reports the BBC.
South Korea’s Joint Chiefs of Staff later said the detonation had a yield of about 10 kilotonnes, making it the North’s “strongest nuclear test ever”.
That is almost twice the power of its last test in January, which Pyongyang said at the time had been a hydrogen bomb. Many analysts cast doubt on that claim. The bomb dropped by the US on Hiroshima in 1945 had a yield of about 15 kilotonnes.
A fifth test has long been expected. In recent weeks, satellite imagery has shown increased activity at Punggye-ri.
The North also often uses nationally important dates as an opportunity for a show of military strength. Friday is its National Day, celebrating the founding of the current regime.
It is likely to be some time before the scale and manner of the test are independently confirmed.
Japan has despatched military aircraft to collect air samples to monitor for radiation, while China said it was monitoring radiation levels close to its borders with the North.
North Korea is banned by UN sanctions from any tests of nuclear or missile technology.
But in recent months it has conducted a series of ballistic missile launches – some of which reached Japanese waters – and has unleashed a rising tide of aggressive rhetoric, threatening nuclear attacks on its enemies.
The North has also been angered by a US and South Korean plan to install an anti-missile defence system in the South and by the allies’ massive annual joint military exercises, which are still taking place.
International sanctions were considerably toughened in response to its previous nuclear and missile tests, but had little impact on Pyongyang’s determination to be a nuclear-armed state.