After Pyongyang confirmed it had gone ahead with the test in defiance of international pressure, world leaders responded with condemnation.
Among those countries criticizing North Korea were the United States, China, Russia, Japan and South Korea -- the five nations that had been in talks with North Korea for years over its nuclear program.
"This is a highly provocative act" that threatens regional stability, breaches U.N. resolutions and increases the risk of proliferation, Obama said in a statement.
"North Korea's nuclear weapons and ballistic missile programs constitute a threat to U.S. national security and to international peace and security," he said, calling for "further swift and credible action by the international community."
Deputy Defense Secretary Ash Carter told the Senate Armed Services Committee on Tuesday that the test appeared to be timed to coincide with Obama's State of the Union speech Tuesday night.
"They had several other holidays this week that they could have taken advantage of. They tend to like to do this on holidays," Carter said.
South Korea said the test presented "an unforgivable threat to the Korean peninsula's peace and safety."
"North Korea should be responsible for all the serious consequences brought by such an action," said Chun Young-woo, national security adviser to South Korean President Lee Myung-bak, who is near the end of his term in office.
Obama and Lee spoke Tuesday "to consult and coordinate on the response" to the test, the White House said.
Russia's Foreign Ministry issued a statement demanding that North Korea refrain from any nuclear missile program and adhere to U.N. Security Council guidelines.
It condemned the test as an affront to the community of nations: "It's doubly sad that we are talking about the state with which our country has a long history of good neighborliness."
Japanese Prime Minister Shinzo Abe called the testing a "grave threat to the safety of Japan and a serious challenge against international disarmament framework based on the non-nuclear proliferation treaty."
Military jets in Japan were monitoring radioactive fallout, but all appears to be fine, authorities said.
U.N. Secretary-General Ban Ki-moon called the test "a clear and grave violation of the relevant Security Council resolutions."
The China question
Perhaps the most closely watched reaction came from China, North Korea's main ally and the source of crucial economic and political support to the regime in Pyongyang.
The Chinese Foreign Ministry said it "resolutely opposes" the North's latest test, which it noted had taken place "despite the international community's widespread opposition."
Beijing summoned the North Korean ambassador to China over its "dissatisfaction" with the test, the ministry said.
It said it "strongly" urged North Korean officials to "abide by their promise to denuclearize and take no further action that will worsen the situation."
The real question, though, is whether Beijing will support significantly tougher measures against its smaller neighbor following the test, something it has refrained from doing in the past.
"The Chinese don't like the idea of international sanctions and coercing other countries," Chinoy said. "They still have a strategic interest in maintaining a viable separate North Korea as a buffer against a pro-U.S. South Korea, and that has only become more important as tensions between the U.S. and China have increased."
Recent opinion articles published in the state-run Chinese newspaper Global Times suggested Beijing's patience with North Korea may be wearing thin and raised the prospect of reducing support to Pyongyang.
But with fears in Beijing of what a possible collapse of the North Korean regime could bring, strong measures appear unlikely for the time being.
"I think the key with China right now is that they are necessary to a solution, but we can't expect them to solve the problem for us," said Philip Yun, executive director of the Ploughshares Fund, a U.S.-based foundation that seeks to stop the spread of nuclear weapons.