"We have successfully conducted another nuclear test on May 25 as part of the republic's measures to strengthen its nuclear deterrent," the official KCNA news agency said.
It said the test would "contribute to defending the sovereignty of the country and the nation and socialism and ensuring peace and security on the Korean Peninsula."
The statement said the test was conducted "on a new higher level in terms of its explosive power and technology of its control".
|The test site is believed to be near the northeastern town of Kilchu
Russia later said it believed the explosion from the test had a yield of 10-20 kilotonnes - about the same as the US bombs used against the Japanese cities of Nagasaki and Hiroshima at the end of World War Two.
The test is a dramatic escalation in the long-running stand-off over North Korea's nuclear programme.
Japan said that the North's move marked a clear violation of UN Security Council resolutions.
"We will definitely not tolerate it," Takeo Kawamura, Japan's chief cabinet secretary, told reporters in Tokyo.
The Security Council is expected to hold an emergency session on Monday in New York to discuss the test, Russia's ambassador to the UN, said.
Earlier, the US Geological Survey (USGS) said it had detected a magnitude 4.7 tremor in North Korea at 0954 local time (0054GMT) on Monday, indicating that a nuclear test may have taken place.
|The test comes less than two months after the North's controversial rocket launch [EPA]
The area is not seismically active.
The USGS located the epicentre of the tremor near the town of Kilchu about 375km northeast of the North Korean capital, Pyongyang.
The site is close to where North Korea conducted its first nuclear test in October 2006.
Susan Potter a geophysicist based at the US National Earthquake Information Center in Golden, Colorado told Al Jazeera the tremor had been a "relatively shallow seismic event".
She said the October 2006 test had registered a somewhat weaker tremor of magnitude 4.3.
At the time of the 2006 test, experts said the apparently relatively low yield of the device indicated it may not have exploded correctly.
January 10, 2003: North Korea announces it is withdrawing from the Nuclear Non-proliferation Treaty.
August 27-29, 2003: North joins first round of six-nation talks with China, Japan, Russia, the US and South Korea.
February 10, 2005: North announces for the first time that it has nuclear weapons.
October 9, 2006: Following growing tensions over US sanctions North Korea conducts first test detonation of a nuclear device.
February 8-13, 2007: Beijing six-nation talks reach tentative agreement on aid for disarmament deal.
June 27, 2008: North Korea destroys cooling tower at Yongbyon nuclear plant in a symbolic gesture of pledge to end nuclear programme.
April 5, 2009: Pyongyang launches rocket it claims to carry communications satellite, but which neighbours insist is a long-range missile test.
May 25, 2009: North Korea conducts second nuclear test, raising tensions and international condemnation.
Click here for complete timeline
The latest North Korean test is likely to trigger calls for a tightening of sanctions against North Korea, although what those might be is not clear as existing measures have had little effect.
China, North Korea's closest ally and a veto-wielding member of the Security Council, is likely to oppose stronger sanctions as part of any new UN resolution.
However, analysts say China is likely to be angered by the North Korean test and will look for other ways to put pressure on Pyongyang.
Beijing has not yet given any official reaction to the test, but Al Jazeera's Beijing correspondent Tony Cheng said any public reaction was likely to be muted.
However, he said the last thing that Beijing wants to see is an escalation of tensions on the Korean peninsula.
The test comes amid escalating tensions on the Korean peninsula and less than two months after North Korea's controversial rocket launch in early April.
North Korea says the launch put a satellite into orbit, but the US has said it believes the launch was a cover for a test of the North's long-range missile technology.
The April 5 rocket launch triggered condemnation from the Security Council, in turn provoking an angry reaction from the North, which said it was pulling out of nuclear disarmament talks and restarting its weapons programme.
It had also repeatedly threatened to conduct a new nuclear test.
North Korea is believed to have extracted enough weapons grade plutonium for about eight bombs and has said it will restart its mothballed nuclear plant at Yongbyon to produce more.
Speaking to Al Jazeera, Ron Huisken, a nuclear non-proliferation expert at the Australian National University, said that through Monday's test North Korea had signalled a determination to remain committed to its nuclear weapons capability.
But he said the test did not signify an immediate danger.
"North Korea can't actually do anything at this point," he said.
"To the best of our knowledge, it hasn't actually weaponised its nuclear material. Certainly it hasn't miniaturised it to the point where you can put a bomb on an airplane or – even more technically demanding – on top of a missile."
Donald Kirk, a Korea expert based in the South Korean capital, Seoul, said Monday's test was designed to draw international attention and fortify "North Korea's claim to be the ninth nuclear power".
He added that the test was also certain to raise tensions in the region and "raises the spectre of a nuclear arms race in northeast Asia" with Japan Taiwan and South Korea, among others, possibly tempted to develop their own nuclear weapons.