The UN Security Council prepared to convene in an emergency session in New York to assess how to handle the threat as capitals around the world rushed to condemn the blast as provocative and worrying.
The blast also underlined North Korean leader Kim Jong-Il's willingness to test the nerve of the international community, which had warned Pyongyang just last week that it would pay a heavy price if it tested a nuclear device.
A host of countries led by the United States, Japan, Britain, and Australia called for stern UN action, South Korea warned that it may end its policy of engagement with the secretive regime and China - Pyongyang's closest ally - condemned the test as "brazen."
US officials said that President George W. Bush would make a statement at 1345 GMT, roughly 15 minutes after the scheduled start of the UN meeting.
The Japanese embassy in Seoul said that Bush and Japanese Prime Minister Shinzo Abe agreed after telephone talks to take "decisive action" against North Korea at the UN Security Council.
It said that they saw Pyongyang's announcement as "categorically unacceptable" and "grave threat to peace and stability in the international community."
In the South Korean capital, Seoul, activists burned North Korean leader Kim Jong-Il's portrait. Stock markets across Asia fell on worries of a new nuclear arms race in the region.
One of the most isolated and impoverished nations in the world, reliant on outside aid to feed its own people, North Korea called the blast an "historic event" carried out for the betterment of security and peace. "The nuclear test was conducted with indigenous wisdom and technology, 100 percent," North Korea's official KCNA news agency announced.
Russian defense minister Sergei Ivanov said that officials estimated its size as anywhere between five and 15 kilotons - the higher end of the estimate being greater than the US bomb that destroyed Hiroshima at the end of World War II.
China had a 20-minute advance warning, South Korean officials said.
The officials said that the test appeared to have been carried out at 0136 GMT Monday at Hwadaeri, near North Korea's northeast coast.
The South Korean presidential office said that the state intelligence agency had detected a 3.58-magnitude seismic tremor at that time.
China was one of the first nations to condemn the test, urging North Korea to "stop all actions that can lead to the deterioration of the situation" but also calling on the international community to respond calmly.
The United States slammed the "provocative act."
"We expect the Security Council to take immediate action to respond to this unprovoked act," White House spokesman Tony Snow said.
In Seoul, a somber-looking President Roh Moo-Hyun vowed that his government would "sternly deal" with a threat that he described as a "betrayal" of hopes for a nuclear-free region.
He said that under the present circumstances, "the government will find it difficult to stick to its engagement policy toward North Korea."
"We must not give up [on dialogue] but the situation is changing."
In an immediate move, South Korea, still technically at war with the North since the 1950-53 Korean War, suspended a scheduled shipment of 4,000 tons of cement in flood aid.
There was also speculation of a possible second test, South Korea's Yonhap news agency, quoting the country's spy agency chief Kim Seung-Gyu as telling parliament of unusual activities at a site at Punggyeri, about 30 kilometers northeast of Hwaderi.
Japan's Abe, who rose to prominence by taking a tough line on North Korea, said that Japan and the United States would step up joint work on a missile defense system.
"We need to make a stern response, and North Korea will be responsible for all the consequences," he told reporters.
Russia, one of the six nations - besides the two Koreas, China, Japan, and the United States - involved in stalled talks trying on curbing Pyongyang's nuclear ambitions, urged North Korea to return to the negotiating table.
President Vladimir Putin said that the test had caused "huge damage" to efforts to restrict the spread of weapons of mass destruction.
Intelligence officials told South Korea's parliament that the test appeared to have been carried out in a horizontal tunnel in a 360-meter-high (1,200 feet) mountain northwest of the Musudan missile base, according to lawmaker Chung Hyong-Keun.
The US Geological Survey (USGS) said that it had detected an earthquake of a magnitude of 4.2 degrees on the Richter scale in North Korea.
A USGS geologist said that the quake was a "shallow event or very close to the surface."
There were no reports of radioactivity, in line with what the North Korean news agency also claimed.
Pyongyang had announced last week that it intended to carry out a test in what it called a self-defense measure against US aggression, saying then that it stood "at the crossroads of life and death."
There are some 29,000 US troops stationed in South Korea alongside 650,000 South Koreans, facing off across one of the most heavily militarized frontiers on Earth against about 1.2 million North Korean troops - the world's fourth-largest army in terms of numbers.
The United States warned Monday that it would come to the defense of Japan, which has been officially pacifist since World War II, and other allies.
Monday's test marks a definitive moment for the stalled six-nation talks, which had appeared to progress last year when Pyongyang said that it would abandon its nuclear program in exchange for security and other guarantees.
However, it walked out of the talks last November following US sanctions, and was slapped with separate, limited sanctions by the Security Council after test-firing seven missiles in July this year.
© 2006 Agence France-Presse
