North Korea is prepared for both dialogue and confrontation, its KCNA news agency quoted a foreign ministry spokesman as saying on Wednesday.
"If the US continues to hassle us and add pressure, we will consider this as a declaration of war and subsequently take physical measures," the spokesman was quoted as saying."If the United States continues to take a hostile attitude and apply pressure on us in various forms, we will have no choice but to take physical steps to deal with that."
North Korea's number two leader had earlier warned Pyongyang may carry out more nuclear tests if the US continues its "hostile attitude" towards the communist state.
Kim Yong Nam, president of the Presidium of the Supreme People's Assembly, said in an interview with Japan's Kyodo news agency: "The issue of future nuclear tests is linked to US policy toward our country.
"The harder the pressure will be, the stronger will be the level of our response"
North Korean official
Kim said that North Korea also considered US policy toward the country the main factor for determining whether to return to the stalled six-party talks on North Korea's nuclear programmes.
His comments came ahead of a scheduled UN security council meeting on Wednesday to discuss punitive sanctions against Pyongyang after it announced it had undertaken a nuclear detonation on Monday.
Japan's government meanwhile has decided to impose fresh sanctions on North Korea, public broadcaster NHK said, with all North Korean vessels being banned from Japanese ports.
China, Pyongyang's closest ally, has said it is ready to consider sanctions.
The US is pushing for the interdiction of all suspicious ship-borne cargoes.
South Korea's vice foreign minister, Lee Kyu-hyung, said in Seoul that his government, which has shied away from sanctions in the past, supported the discussions in the Security Council.
North Korea's first official statement on Wednesday since it announced the explosion on Monday said the blast was a success.
However a North Korean diplomat was quoted on the website of the local newspaper Hankyoreh as saying that the test, which the North has proclaimed as a success, was smaller than expected.
"The test was smaller in scale than anticipated," the unidentified diplomat was quoted as saying in Beijing. "But the small-scale success means a large-scale [test] is also possible.