North Korea's warning comes at a time of raised tensions with Seoul
North Korea has warned the US, Japan and their allies not to interfere in its planned rocket launch next month.
Pyongyang insists it intends to send up a communications satellite and has asserted its right to the peaceful development of its space programme.
In a statement carried by state media, it said any UN sanctions imposed for the launch would threaten any future negotiations on its nuclear activities.
There are concerns the North plans to test-fire a long-range missile.
North Korea says it plans to carry out the controversial launch between 4 and 8 April.
Some regional powers believe it is planning to test-fire the Taepodong 2 missile - which is capable of reaching Alaska - from the Musudan-ri base in Hwadae on its north-east coast.
It first tested the missile in July 2006, but it failed less than a minute after launch.
Japan has suggested it could deploy a vessel equipped with missile interceptor technology to the Sea of Japan (East Sea) to shoot the rocket down.
The foreign ministry, in a statement published by the Korean Central News Agency, said any punitive UN measures would violate a September 2005 six-nation deal on mutual respect.
"If such a hostile activity is carried out under the name of the UN Security Council, that would be a breach by the UN Security Council itself."
It said that if the deal were "abrogated", there would be "no ground for the six-party talks to exist any more".
The six-party talks, which include China, South Korea, the US, Japan, and Russia, aim to offer aid to Pyongyang in return for the North ending its controversial nuclear activities.
Negotiations have been deadlocked for months because of a dispute with the US over how to verify the North's full range of past nuclear activities.
North Korea's move is stoking already heightened tensions on the Korean peninsula.
Earlier this month, Pyongyang closed its border with the South, and cut communications in protest at a US-South Korean military exercise.
It has also detained two female US journalists on the China-North Korea border.
In January, the North scrapped a series of peace agreements with the South over Seoul's decision to link bilateral aid to progress on denuclearisation.