By Paul Reynolds
World affairs correspondent, BBC News website
North Korea's launching of a rocket has, despite its apparent failure to put a satellite into orbit, provided a new headache for US President Barack Obama as he formulates his policy towards the unpredictable totalitarian state.
"The launch served a dual function," said Dr John Swenson-Wright of the think-tank Chatham House, who is based in South Korea.
President Obama's dilemma is how far to negotiate and how far to threaten
"It would like to have placed a satellite in orbit, but it also wanted to make a successful rocket launch, and initial data suggests that this might have been partially successful."
He says North Korea was flexing its military muscles.
"This was also a political and diplomatic initiative, to show that the leadership is still in control after [President] Kim Jong-il's reported stroke... and it takes advantage of the new American president to strengthen its position.
"Its bottom line is to say: 'We are here and we matter and we act in our national interest'."
In firing the rocket, the North was, in the view of the US and its allies, in violation of UN Security Council resolution 1718.
This, passed in the aftermath of the North's claimed nuclear test in 2006, ordered it not to "conduct any further nuclear test or launch of a ballistic missile" and to "suspend all activities related to its ballistic missile programme".
North Korea was probably trying to get round this provision by claiming that the aim was to launch a satellite.
To save face, it has announced that the satellite is working, beaming out revolutionary songs.
The nature of the launch certainly served the purpose of dividing the Security Council.
Russia wondered if the event had even transgressed 1718 and China urged caution anyway.
The US and others now want to increase sanctions, but these have not worked much up until now, and North Korea is not responsive to them.
The reason that the US and the North's neighbours are so concerned is that, if one day North Korea makes a nuclear warhead capable of being carried on a ballistic missile and it develops that missile successfully, it will have become a fully fledged nuclear-armed state.
Headache for Obama
As for the efforts to try to get the North to stop its nuclear weapons development, the ongoing six-party talks on the issue - made up of North Korea, its regional neighbours and the US - are stalled over the question of verifying the shutdown of the Yongbyon plant, including its plutonium plant.
President Obama has recently appointed his special envoy for North Korea, Stephen Bosworth, who is trying to work out how to get the talks restarted and what prospects they have.
"This is a headache for Obama," said John Swenson-Wright. "North Korea is very good at delay and at rewriting previous agreements.
"Its military is probably unhappy at the idea of losing the nuclear resource, so maybe it wants to hang on to it for as long as possible."
The fact is that nobody really knows what the North's ultimate intentions are.
It may want to dodge and weave its way past sanctions and talks, and one day develop a usable nuclear weapon and a missile that could deliver it.
Or it may be content to hold the world's attention while keeping its options open and making concessions here and there, withdrawing them when it feels the need.
President Obama's dilemma is how far to negotiate and how far to threaten. North Korea is a problem that Presidents Clinton and Bush could not solve before him.
Mr Obama does not have an easy task in front of him.