By Paul Reynolds
World affairs correspondent, BBC News website
North Korea is acting in defiance of the Security Council
So it's another step backwards again with North Korea.
In defiance of a Security Council resolution (1718) passed after its first nuclear test in 2006, it has now announced a second. It has also implied that it has solved some at least of the problems it encountered in the first.
The actual technical achievement remains to be examined. But the test itself represents a continued belligerency whose destination is unknown.
It follows hard on the heels of the North's attempt to place a satellite in orbit, seen by most governments as basically a test of a ballistic missile - again in contravention of resolution 1718.
Pyongyang has also announced its withdrawal from the six-party talks that have been the framework for negotiations and has said it will restore its partially-disabled nuclear reactor at Yongbyon.
And all this after the optimism of September 2005 when the North agreed to give up its nuclear programme in exchange for aid and security guarantees.
President Obama's special envoy Stephen Bosworth has offered talks with the North but for the moment at least this offer has been refused. Further sanctions seem the most likely course now. Mr Obama is on a well-established obstacle course which has confounded his predecessors.
North Korea presents a classic example of the dilemmas involved in dealing with a state whose behaviour is predictably unpredictable.
The basic rule for dealing with such states is that there is no rule.
But a major consideration is how powerful they are. In 2002 Libya could be pressured into admitting and giving up a secret nuclear programme because it was weak and exposed.
North Korea has a million-strong army, with more than 4,000 tanks and about 18,000 artillery pieces, according to the International Institute for Strategic Studies.
Its forces are encamped only a short distance from the South Korean capital, Seoul. An Iraq-style invasion is not possible.
So options are limited.
War and diplomacy
Everything has been tried with North Korea.
First, there was military force. In 1950, after the North launched an invasion of the South on 25 June - under the leadership of Kim Jong-il's father, Kim Il-sung - the Security Council authorised military action in response, in the absence of the Soviet Union, which was unwisely boycotting the council at the time.
Analysts are fearful of what might happen if the regime collapses
The war ebbed and flowed until it ended in July 1953, leaving things much as they had been before it started. Korea was still divided.
Having tried war, the outside world turned to isolation. But North Korea survived, protected by the Soviet Union and China, whose forces had prevented the North from being defeated in the war.
Matters next came to a head in 1994 when diplomacy tried its hand. It has been trying ever since.
The crisis was precipitated by the unloading from the Yongbyon reactor of fuel rods that could be used for plutonium with which to build a nuclear device.
According to an account of the confrontation by Don Oberdorfer (Washington Monthly, December 1997), the senior US Air Force commander in South Korea said privately: "We all thought we were going to war."
This was, however, during the Clinton presidency.
Bill Clinton was not inclined to take military action unless really pressed (for example, he failed to do so in Bosnia for months and he waged war on Serbia in 1999 by air attack only).
So he considered two options offered by diplomacy - the first was to rally North Korea's neighbours into further isolating it and imposing sanctions. The second was to engage it in negotiations.
Bill Clinton typically chose to give priority to the second.
Another former US president, Jimmy Carter, had also believed in the power of argument, and it was to Carter that President Clinton turned.
Jimmy Carter went to North Korea and in due course what emerged was an "Agreed Framework" under which the North would freeze its nuclear programme in exchange for much-needed supplies of fuel oil.
What also emerged in due course was a realisation of the immense difficulty of making this agreement, and subsequent ones, stick.
The framework fell apart when the fuel oil was delayed, setting a pattern under which the North would say one thing and then go back on it in response to some claimed or actual failure by the other side.
Gradually diplomacy got tougher and when President Bush came to power it was all but abandoned as the North was declared to be part of the "Axis of Evil".
Pyongyang insists its launch carried a communications satellite
Sanctions, diplomacy's tougher sister, were the weapon used by the Bush team.
But even that failed. The North announced that it had tested a nuclear weapon in 2006 and charged ahead with its ballistic missile development despite Security Council resolutions against both.
So in the end the Bush administration turned back to talks, helped by the North's close friend China.
In 2007, the North again committed itself to ending nuclear development. The Bush administration took it off the list of "terrorist supporting" states.
There are still those, like former US ambassador to the UN, John Bolton, who feel that any attempt to negotiate an agreement with North Korea is appeasement and will not work.
In any event, it has now fallen apart again.
This does not mean that it cannot be put back together. The pattern has also been that the North, having made a point, returns.
The long-term hope in these situations is that the regime itself will collapse. This became the solution to the Cold War.
Deterrence, containment, detente - all were tried and played their part. But the answer came unexpectedly when the system itself proved incapable of surviving.
China offered a different solution. There change, not collapse, was the formula.
The danger with North Korea is that collapse, or fear of it, could lead to war, given the militaristic nature of its government.
So another lesson in these cases is how to calibrate pressure that falls short of precipitating a calamity.
No easy answers. Now it is President Obama's turn.