By Paul Reynolds
World affairs correspondent, BBC News website
On the same day, the crises over the nuclear policies of North Korea and Iran have taken a turn for the worse.
A US military response to North Korea's move remains unlikely
North Korea's announcement that it intends to carry out a nuclear weapons test is another grave twist in a crisis that appears to be without end or solution.
And a senior British official has said it is now clear that Iran will not suspend uranium enrichment and that therefore moves to impose sanctions will start in the UN Security Council.
The only hope that can be seen in the North Korean statement is what is not in it. It does not announce that a test has already taken place. Nor does it set a timeframe.
There is therefore some possibility that, by warning of it well in advance, North Korea is simply trying to engage the United States in direct dialogue.
If the North cannot or will not be restrained, then the world might one day have to live with the North Korean bomb
In particular it wants the US to halt moves it has taken to prevent the North from trading weapons parts and carrying out other suspected illegal economic activities.
However, the history of North Korea's nuclear ambitions is such that it is only realistic to take its statement at face value and to expect a test at some stage.
It has previously withdrawn from the nuclear Non-Proliferation Treaty and has announced that it has built nuclear weapons. A test is a logical technical follow-up.
Any test would cause extreme concern in the region and might in due course propel both South Korea and Japan to go down the nuclear weapons route themselves.
The reaction of the United States to a test is obviously not going to be favourable but is unlikely to be military. The risk of North Korea launching an attack on South Korea (whose capital Seoul is very close to the border line) in retaliation is very high, probably too high to risk.
The US very much hopes that China will be able to restrain the North Koreans, who rely heavily on Chinese aid, but so far this has not happened.
(Update 5 October: The senior US official for the region, Assistant Secretary Christopher Hill said: "We are not going to live with a nuclear North Korea. We are not going to accept it...It can have a future or it can have these weapons. It cannot have both." He did not explain what action the US might take.)
There is a chance the North's move may be a gambit for dialogue
If the North cannot or will not be restrained, then the world might one day have to live with the North Korean bomb.
The policy then would be to isolate the North even further. It is already subject to sanctions against its nuclear and missile programmes under a Security Council resolution passed this summer.
The hope would be that in the course of time, the regime will collapse internally as other communist regimes have done and that it will no longer be a threat.
But for this to happen the US would have to accept that this part of what President George W Bush calls the "axis of evil" will remain.
As for Iran it is no surprise that negotiations now appear to have come to a halt.
They were being led by the EU's foreign policy representative, Javier Solana, and his conclusion, reported to the permanent five members of the Security Council plus Germany, is pessimistic.
The EU says Iran will not suspend uranium enrichment
Iran, he has reported back, will not suspend enrichment as demanded by the Security Council.
The next move, according to a senior British official, will be an attempt to get sanctions imposed on Iran by the council.
This will be easier said than done and even if achieved, sanctions are unlikely to stop Iran at this stage.
The US has imposed a wide-ranging embargo on Iran for more than 25 years and it has made no difference to Iran's policy.
"They are all hardliners in Tehran at the moment," a British official commented.
The sanctions were threatened in the resolution demanding suspension that was passed on 31 July and need a separate council decision.
Russia and China have hitherto been opposed to sanctions and France has recently expressed doubts as well.
They might be prepared to take limited steps but the effect of these is not likely to be severe on Iran.
The issue of a military attack on Iran is not on the agenda.