Christopher Hill, assistant secretary of state and the US envoy to nuclear talks with North Korea, said in Washington DC on Wednesday that Pyongyang was contacted through its UN mission in New York.
A North Korean nuclear test "would be a very highly provocative act, and the international community cannot be indifferent to that", Hill said at a ceremony at the US-Korea Institute, which is part of the Johns Hopkins School of Advanced International Studies.
The US will not live with a nuclear-armed North Korea, Hill said.
He warned North Korea that "it can have a future or it can have these weapons. It cannot have both".
'All we can'
Hill refused to say exactly what steps the US might take to ensure that North Korea did not succeed in testing a weapon, but promised "we will do all we can to dissuade the DPRK from this test".
"We are not going to live with a nuclear North Korea, we are not going to accept it," Hill said.
North Korea, which has said previously that it had nuclear bombs, said on Tuesday it would conduct its first nuclear test.
South Koreans have expressed
'grave concern and regret'
"We would have no choice but to act resolutely to make sure that the DPRK understood - and to make sure that any other country understands - that this [nuclear test] is a very bad mistake," Hill said.
Hill acknowledged that "we are in a very tense time" in dealing with Pyongyang. He repeated that the US was willing to meet with North Korean negotiators in a bilateral setting, but only in the context of the six-party talks.
He said: "We passed a message of our deep concern about this test. We did not receive any answer of course. They just took the message."
North Korea's stand
Earlier in the day, a North Korean diplomat rejected criticism that his country's announcement it would conduct a nuclear test was provocative, saying it was a necessary deterrent to US aggression.
Pak Myong-guk, an official at the North's embassy in Australia who described his title as minister, echoed the wording of Tuesday's official announcement from Pyongyang that the North was compelled by threats of nuclear war and US economic sanctions to conduct a nuclear test at some time in the future.
The statement from Pyongyang gave no precise date when a test might occur.
Asked about a comment by Condoleezza Rice, the US secretary of state, that such a test would be a provocative act, Pak told The Associated Press: "It is not provocative, it is just the corresponding measure for defence, for us to defend ourselves. It is the really essential process for nuclear deterrent."
Responding to the announcement, South Korea urged North Korea on Wednesday to renounce its nuclear test plan and return to international disarmament talks, saying Seoul will not tolerate the North's possession of nuclear weapons.
North Korea's plan has rung high
level alarms across the region
"We express grave concern and regret," Choo Kyu-ho, the country's foreign ministry spokesman, said.
"We urge North Korea to immediately scrap the nuclear test plan. In addition, the North should return to six-party talks unconditionally without taking any further steps aggravating the situation.
"If North Korea pushes ahead with a nuclear test, North Korea should take full responsibility for all consequences." Choo did not elaborate.
The South's announcement came after the country held an emergency meeting of security ministers earlier in the day.
Japan for talks
For his part, Shinzo Abe, Japan's new prime minister, is to discuss the issue with the leaders of China and South Korea in summits to be held next week, reports said on Wednesday.
Pyongyang's pledge to test a nuclear weapon will top the agenda for Abe's fence-mending summits with Tokyo's neighbors, the Yomiuri Shimbun reported, citing unnamed foreign ministry sources.
"I plan to discuss the regional situation including North Korea," Abe said late on Tuesday, when asked about the expected summits in Beijing and Seoul, the Yomiuri and other major local media reported.
Australia's foreign minister said on Wednesday he wanted a meeting with the North Korean ambassador to Australia over the Asian country's "deeply offensive" nuclear test plan.
Alexander Downer said that he would seek a meeting with Chon Jae Hong on Wednesday to discuss the implications of North Korea's announcement that it plans to conduct a nuclear test.