In a statement adopted unanimously on Friday, the UN Security Council urged Pyongyang to cancel its planned nuclear test and return immediately to talks on scrapping its nuclear weapons programme, saying that exploding a nuclear device would threaten international peace and security.
A nuclear test would "jeopardise peace, stability and security in the region and beyond" and "bring universal condemnation by the international community," the Security Council said.
The statement urges North Korea to scrap all nuclear weapons and existing atomic programmes.
It expressed the council's "deep concern" over North Korea's announcement last Tuesday that it would conduct a nuclear test and urged it not to carry it out, saying a test would not help North Korea address its concerns, especially strengthening its security.
The statement also warns North Korea that a nuclear test would lead to further unspecified Security Council action "consistent with its responsibility under the Charter of the United Nations".
The statement said: "The Security Council will be monitoring the situation closely."
North Korea was urged to return immediately to six-party talks on its nuclear programme and to work toward the implementation of a September 2005 agreement in which North Korea pledged to give up its nuclear programme in exchange for aid and security guarantees.
North Korea has boycotted the six-nation talks for a year, angered by American financial restrictions imposed because of the country's alleged illegal activities such as money laundering and counterfeiting.