N Korea threatens military action
N Korean military officers celebrate the nuclear test at Pyongyang Indoor Stadium on 26 May (KCNA)
North Korea's military celebrated the controversial nuclear and missile tests
North Korea says it has abandoned the truce that ended the Korean war, amid rising tension in the region.
It blamed its decision on South Korea joining a US-led initiative to search ships for nuclear weapons.
It said the South's actions were a "declaration of war", and pledged to attack if its ships were stopped.
The move is part of an increasingly hard line being taken by North Korea, and comes two days after it conducted an underground nuclear test.
Meanwhile, South Korean news reports say that steam has been seen coming from a plant at the North's main nuclear facility, a sign that it has made good on its threat to restart efforts to make weapons-grade plutonium.
The United Nations Security Council is working on a strong resolution condemning North Korea's actions, including possible punitive measures.
In a statement to the North's official news agency, KCNA, the military warned that it no longer considered itself bound by the terms of a truce which ended the war between the two Koreas.
That agreement has preserved a tense peace for more than five decades.
test and missile launches in North Korea
The immediate cause of North Korea's actions, it said, was South Korea's announcement on Tuesday that it would definitely join the Proliferation Security Initiative (PSI) - a US-led campaign to search ships carrying suspicious cargoes to prevent trafficking of weapons of mass destruction.
Joining the PSI "is a natural obligation", South Korean Foreign Minister Yu Myung-hwan told reporters. "It will help control North Korea's development of dangerous material."
But North Korea's response has been unequivocal.
"Any hostile act against our peaceful vessels, including search and seizure, will be considered an unpardonable infringement on our sovereignty," a spokesman for the North's army told KCNA.
"We will immediately respond with a powerful military strike."
Tensions have already risen significantly across the Korean peninsula in recent weeks.
Last month North Korea launched a long-range rocket over Japanese airspace, angering the international community.
Pyongyang said the rocket carried a satellite, but several nations viewed it as cover for a missile test.
The US envoy to the UN strongly criticised the North
The UN Security Council condemned the rocket launch, and in retaliation North Korea announced it was quitting long-running six-nation negotiations on its nuclear disarmament.
It also said it would reopen its main nuclear plant at Yongbyon, which was closed in July 2007 as part of a disarmament deal. According to South Korean media reports, the plant may now be reactivated, as spy satellites have seen steam coming out of it.
On Monday North Korea increased tensions still further, by conducting a powerful underground nuclear test.
It has also fired six short-range missiles in recent days.
Oct 2006 - North Korea conducts an underground nuclear test
Feb 2007 - North Korea agrees to close its main nuclear reactor in exchange for fuel aid
June 2008 - North Korea makes its long-awaited declaration of nuclear assets
Oct 2008 - The US removes North Korea from its list of countries which sponsor terrorism
Dec 2008 - Pyongyang slows work to dismantle reactor after a US decision to suspend energy aid
Jan 2009 - The North says it is scrapping all deals with the South, accusing it of "hostile intent"
April 2009 - Pyongyang launches a rocket carrying what it says is a communications satellite
25 May 2009 - North Korea conducts a second nuclear test
Q&A: North Korea nuclear test
What is N Korea's game plan?
Diplomats from the five permanent Security Council member countries - plus Japan and South Korea - have been meeting behind closed doors to discuss a new resolution against North Korea.
Washington is calling for a quick and unified response that will make it clear to Pyongyang that there are consequences for its actions.
But US State Department spokesman Ian Kelly said the door was still open to resume long-running six-party talks and that the US was looking at a "whole range of options".
"We are thinking through complicated issues that require very careful consideration," said the US ambassador to the UN, Susan Rice.
While the US and Japan are likely to favour a hard line against North Korea, Russia and China are more wary about pushing Pyongyang too far, analysts say.
A few years ago there was real hope of reaching a settlement, when North Korea agreed in February 2007 to abandon its nuclear ambitions in return for aid and diplomatic concessions.
But the negotiations stalled as it accused its negotiating partners - the US, South Korea, Japan, China and Russia - of failing to meet agreed obligations.