An unnamed spokesman for the North's Foreign Ministry was quoted as saying by KCNA that recent U.S. aggression compels North Korea "to opt for possessing a necessary deterrent force and put it into practice."
During talks in Beijing last week, one U.S. official said North Korean envoy had said the country already had nuclear weapons and had processed spent fuel rods to create even more. There were conflicting reports on whether the envoy also indicated North Korea planned a test of its weapons soon.
The warning on Wednesday came after South and North Korea agreed to try to peacefully resolve the nuclear crisis, though Pyongyang has said further talks with the United States are useless unless it drops its demand that the North first scrap suspected atomic weapons programs.
North Korea says abandoning such programs would leave it defenseless and has in the past said sanctions would be seen as a step toward war.
Pyongyang "will take self-defensive measures, regarding it as the green light to a war" if Washington seeks a U.N. resolution authorizing economic sanctions against it, North Korea said in a statement on KCNA, its official news agency.
South Korea's Foreign Minister Yoon Young-kwan declined to answer a reporter's question Tuesday as to whether the South would support sanctions. He described the issue as a "very delicate and very sensitive."
The agreement between the two Koreas pledging to resolve the dispute peacefully was made after four days of talks in Pyongyang. But it was unlikely to mark a change in attitude by North Korea. The communist state agreed to similar communiques at previous Cabinet-level talks.
The North has insisted that the South should not meddle in the nuclear standoff, calling it a dispute with the United States. Throughout the crisis, which began in October, North Korea has demanded bilateral talks with Washington, while the U.S. has sought to regionalize the negotiations.
Secretary of State Colin Powell said the United States was reviewing an offer by North Korea to give up its missiles and nuclear facilities in exchange for substantial U.S. economic benefits.
A State Department spokesman indicated Monday that North Korea also wants formal, diplomatic recognition from the United States — something that has been withheld since the two countries agreed to a truce suspending the Korean War nearly 50 years ago.
The North Koreans floated the proposal in talks with U.S. envoys in Beijing last week.
According to a senior U.S. official, North Korea said for the first time during that meeting that it had nuclear weapons and was contemplating exporting them, depending on U.S. actions.
In Beijing, Chinese Foreign Ministry spokesman Liu Jianchao questioned whether North Korea had actually made such an assertion. He said that as far as he knew, they have "not made such a statement."
He added that China, which also participated in the Beijing talks, supports the denuclearization of the Korean Peninsula but wants North Korea's "legitimate security concerns" to be addressed.
North Korea has demanded a nonaggression treaty with the United States. The U.S. administration has ruled out such a move, but says some form of written security guarantee could be possible.
Powell called the Beijing meeting "quite useful," but later told the Senate Foreign Relations Committee that North Korea's proposal was "not going to take us in a direction we need to go."