British Prime Minister Gordon Brown called North Korea " a danger to the world," and Russia said the hermit state's defiant act was about equal in power to the US atom bomb dropped on the Japanese city of Nagasaki in 1945 at the end of World War II.

The latest test will further confound the international community, which has for years tried a mixture of huge aid pledges and tough economic sanctions to persuade the impoverished North to give up efforts to build a nuclear arsenal.

It is already so isolated there is little left with which to punish an autocratic government that has long been willing to take dealings with the outside world to the brink.

At home, its leaders repeatedly stress the threat from a hostile United States to justify heavy spending on the military that keeps them in power but which has meant deepening poverty, at times famine, for most of the rest of its 23 million people. " (North Korea) successfully conducted one more underground nuclear test on May 25 as part of the measures to bolster up its nuclear deterrent for self-defense in every way," the official KCNA news agency said.

The latest test will further confound the international community, which has for years tried a mixture of huge aid pledges and tough economic sanctions to persuade the impoverished North to give up efforts to build a nuclear arsenal

The country's first test, in October 2006, was considered to have been relatively weak, about 1 kiloton, suggesting design problems. Russia's military said the latest test had a force of up to 20 kilotons.

Analysts said North Korea will want the test to raise its leverage in any negotiations with the United States.

The test also comes as speculation has mounted that leader Kim Jong-il, his health uncertain after reports of a stroke last year, wants to strengthen an already iron grip on power so he can better secure the succession for one of his three sons. News of the test rattled South Korea's financial markets, sending the main stock market index down more than six percent at one stage on worries by some that investors would flee.

South Korean protesters shout slogans during a rally against North Korea's nuclear test, in Seoul, on Monday.

Passers-by read extra editions of Japanese newspapers reporting N. Korea's nuclear test.

Ratcheting up tensions further, North Korea test-fired three short-range missiles just hours later, the Yonhap news agency reported. The nuclear test was another blow to South Korean markets, already unsettled by fears of domestic unrest after former President Roh Moo-hyun, who had been questioned over his links to a corruption scandal, jumped to his death at the weekend.

But the decline was short-lived and analysts said investors were used to the North's repeated sabre-rattling, even as it became more aggressive, and would likely panic only if there was military conflict on a peninsula where 2 million troops face each other across one of the world's most heavily armed borders. The UN Security Council was holding an emergency meeting later on Monday in the wake of the nuclear test, Russia's ambassador to the United Nations said.

Itar-Tass news agency quoted Russia's Defense Ministry as saying the blast was up to 20 kilotons, about the same size as the US atomic bomb dropped on Nagasaki in 1945. Russia, the United States, Japan and South Korea all expressed alarm at the test.

US President Barack Obama said it was " a matter of grave concern to all nations" and warranted action by the international community. European Union foreign policy chief Javier Solana called the test " irresponsible" but, like Obama, did not specify what actions the international community might take.

" North Korea's actions are more for international audience, especially the United States," Koh Yu-hwan, Dongguk University professor of North Korea studies, said. " Hawkish military elements of the North Korean leadership want a stronger nuclear deterrence and status as a nuclear power before going to the negotiating table with the US."