N Korea defends nuclear programme
North Korea has stepped up its missile programme in recent weeks
North Korea has boasted of being a "proud nuclear power" and warned the US that it will strike back if attacked.
The statement came after US President Barack Obama said Washington was "fully prepared" for a possible North Korean missile test.
There have been recent warnings in South Korean and Japanese newspapers that the North is preparing another long-range missile launch.
The UN toughened sanctions against the North after a nuclear test on 25 May.
The North has also recently test-fired a number of short-range missiles recently, and in April launched a long-range rocket - which it said was to put a satellite into orbit but which the US said was a missile test.
Military analysts say North Korea's longest-range missile - the Taepodong-2 - has the potential range to reach Hawaii and parts of Alaska.
"As long as our country has become a proud nuclear power, the US should take a correct look at whom it is dealing with," said the commentary in Rodong Sinmun, the newspaper of North Korea's ruling communist party.
"It is a grave mistake for the US to think it will not be hurt if it ignores this and ignites the fuse of war on the Korean Peninsula."
The commentary was published after President Obama said the US military was ready to defend American territory.
"This administration - and our military - is fully prepared for any contingencies," Mr Obama said in an interview to be aired by CBS television on Monday.
Asked if Washington was warning of a military response, Mr Obama said no.
He added: "I don't want to speculate on hypotheticals. But I do want to give assurances to the American people that the T's are cd and the I's are dotted."
Meanwhile, a US naval vessel is tracking a North Korean ship believed to be heading for Burma via Singapore.
South Korea's YTN news reported, citing intelligence sources, that the ship was suspected of carrying illicit weapons in violation of sanctions agreed under a new UN resolution.
China and Russia - the country's traditional allies - approved the sanctions earlier this month, and called for North Korea to return to international talks on its nuclear programme.
The UN resolution calls for inspections of ships to or from North Korea believed to be carrying goods connected to weapons of mass destruction. It also broadens the arms embargo and further cuts the North's access to the international financial system, but does not authorise the use of force.