For the White House, the problem now could be figuring out precisely how the explosion changes the nature of the threat from North Korea's secretive regime – and what, if anything, the US can do about it.
The situation is made more difficult because two US journalists seized March 17 by the North Koreans along the border with China are due to stand trial on illegal entry and other charges in early June.
"For the administration, the immediate challenge is how to get the American journalists out of North Korea without giving North Korea leverage or enhancing the perception that we accept North Korea as a nuclear weapons state," says Scott Snyder, director of the Center for US-Korea Policy at The Asia Foundation.
News of the test became public when North Korea issued a statement saying it had successfully detonated a nuclear device, defying international sanctions. The explosion was much larger than the one associated with its previous nuclear test in 2006, according to the North Korean statement.
Hours later, North Korea ripple-fired three ground-to-air missiles from a site associated with past ballistic missile tests. UN Security Council resolutions bar North Korea from any ballistic missile-related activity.
This weapons activity drew an immediate strong response from the White House. The nuclear explosion was "a blatant violation of international law" that violated North Korea's "own prior commitments," said President Obama.
As for the missile firings, they "pose a grave threat to the peace and security of the world and I strongly condemn their reckless action," said Mr. Obama in an appearance on the White House steps.
The nuclear test is the latest in a string of aggressive actions taken by Pyongyang since it walked away from a denuclearization agreement at the end of the Bush administration.
Despite diplomatic overtures from the new Obama team, North Korea threatened and then carried out a ballistic missile test in April, which appeared a relative failure. Pyongyang then proclaimed that six-party international talks on the future of its nuclear program to be finished. Now, it has carried out its second nuclear explosion.
In addition, North Korea announced in mid-May the upcoming trial for Laura Ling and Euna Lee, the two US reporters in Pyongyang's custody. Ms. Ling and Ms. Lee had been in China reporting on North Korean refugees for Current TV, a California-based firm founded by former Vice President Al Gore.
Two factors appear to be at work in Monday's weapons tests, according to Victor Cha, Korea Chair at the Center for Strategic and International Studies (CSIS) and a former director for Asian Affairs at the National Security Council.
The first is technical. North Korea obviously wishes to perfect both its nuclear and ballistic-missile technology.
The second may be political, writes Mr. Cha in an analysis of the tests. North Korean leader Kim Jong Il reportedly is gravely ill, and the country could be in the process of a leadership succession involving hard-line loyalists and members of the Kim family.
"Internal political fluidity in totalitarian systems like North Korea usually gets externalized in belligerent, not conciliatory, behavior," writes Cha.
Figuring out what North Korea wants from its actions is a game that has frustrated generations of US diplomats and foreign-policy experts. But it is possible that Pyongyang wants nuclear-arms reduction talks with the US – something that would accord it a status as a nuclear-weapons state.
It may also want some kind of regime-security assurance from the US, according to Cha of CSIS. In other words, it could seek a US promise that it will support the current Kim regime through potentially destabilizing internal reforms.
"This stems from the fundamental reform dilemma that [North Korea] faces: It needs to open up to survive, but the process of opening up could lead to the regime's demise," writes Cha.
For the US, one bit of good news, at least in terms of diplomacy, is that the unpredictable Pyongyang regime may finally have gone too far.
The nuclear-weapons test may be so provocative that it could push China, long North Korea's protector, more toward the US camp in terms of policy on the nuclear issue. It could harden political feeling in Japan and perhaps South Korea.
"North Korea's action challenges all the neighbors in ways that arguably should solidify consensus in favor of joint action," says Mr. Snyder of The Asia Foundation.
The US will need to show that North Korea faces some kind of consequence for its actions. But it also needs to avoid inflaming a situation that appears to be caused at least partly by the North Korean regime's own sense of vulnerability, says Snyder.
At the least, some sort of top-level diplomatic mission to the area could well be forthcoming soon. The UN Security Council could seek further condemnatory resolutions. It is even possible that the US could make a change in its defense posture in Asia, via ship or troop deployments.
One crucial point for the US to watch will be the future of North Korea's Yongbyon nuclear plant. In the past, it has been the production site for the regime's stash of weapons-grade plutonium, estimated as large enough to produce six to eight weapons.
Yongbyon is currently shut down in accordance with the disarmament-for-aid deal struck among the two Koreas, China, Japan, Russia, and the US.
But North Korea could move to restart the plant, which could eventually produce about one bomb's-worth of fissile material per year. Restarting the plant would take time – meaning the Obama administration would have 12 months or so to decide how to respond to a move that could directly threaten US national security.
For the US, the prospect of a North Korea armed with nuclear weapons placed on top of ballistic missiles would be very daunting. But perhaps worse would be the prospect of North Korea as a nuclear proliferation state.
Further proliferation aid on the part of North Korean leaders would be worse than production of their own arsenal, said Robert Gallucci, a former US chief negotiator with North Korea, at a seminar on North Korea's nuclear program in 2008.
"This is, to me, the real game," said Mr. Gallucci, referring to Pyongyang's presumed help for Syria. "It's kind of switched, to me."