The official Korean Central News Agency said that, although Pyongyang was pulling out of the NPT, it had no intention of producing nuclear weapons.
"
Our nation will strongly demand from North Korea a quick
retraction of its statement
"
Japanese Chief Cabinet Secretary Yasuo Fukuda
"Our nuclear activities at this stage will be confined only to peaceful purposes such as the production of electricity," Friday's statement said.
But the BBC's Charles Scanlon in Tokyo says the decision will be seen as a very serious escalation of the dispute over North Korea's nuclear programme.
International concern over North Korea's intentions has been growing since it expelled two UN inspectors last month, and re-activated some of its nuclear facilities at Yongbyon.
The announcement coincided with talks in the US state of New Mexico between two North Korean diplomats and a former US ambassador.
The meeting is not officially sponsored by the Bush administration but has its support.
Several governments have strongly condemned Pyongyang's decision to quit the NPT.
Japanese Chief Cabinet Secretary Yasuo Fukuda said: "Our nation will strongly demand from North Korea a quick retraction of its statement."
French Foreign Minister Dominique de Villepin said: "It is a serious decision, heavy with consequences". He is in China for two days of talks on the crisis.
The South Korean Government is to hold an emergency National Security Council meeting at 0800 GMT on Friday to decide how to respond.
The ruling Millenium Democratic Party said in a statement: "The South Korean Government immediately needs to learn what the North wants, and should seek a solution through close discussions with the United States, Japan, China, Russia and the European Union."
Meanwhile, Australia says it will send a senior delegation to North Korea next week to discuss the crisis.
Serious escalation
In its statement, North Korea denounced what it called US aggression, saying: "We can no longer remain bound to the [non-proliferation] treaty, allowing the country's security and the dignity of our nation to be infringed upon".
CRISIS CHRONOLOGY
North Korea last announced it was withdrawing from the NPT in 1993, provoking a dangerous confrontation with the United States. It later suspended the decision and entered talks.
There may be room for manoeuvre this time too. A North Korean diplomat in Beijing said Pyongyang would "reconsider" its withdrawal if the US resumed shipments of fuel oil.
The US, European Union, South Korea and Japan agreed in November to halt fuel shipments to punish Pyongyang for its nuclear programme.
Experts doubt Pyongyang's claim that its nuclear programme is designed to produce electricity - the Yongbyon reactor is too small and could only produce a negligible amount of power.
It is believed the country could produce enough plutonium for five or six nuclear bombs by May.
Our correspondent says fears are growing that North Korea has decided nuclear weapons are the best guarantee of security and, with the US preoccupied with Iraq, now is the best opportunity to get them.
US mediator
Former US ambassador to the United Nations, Bill Richardson, is acting as mediator between the United States and North Korea.
His talks with the two visiting North Korean diplomats on Thursday were "cordial and candid," a US spokesman said, adding that a second three-hour session would begin at 0900 (1600 GMT) on Friday.
Mr Richardson, now governor of New Mexico, said he knew one of the diplomats, deputy ambassador to the UN Han Song Ryol, from when he worked with him in North Korea in 1994.
The Bush administration stressed Mr Richardson would not be speaking on behalf of the US Government, despite being briefed by the American Secretary of State, Colin Powell.
South Korean President Kim Dae-jung and his government maintain that dialogue is the best way to tackle the nuclear controversy.
"We must make the Korean peninsula nuclear-free, but at the same time we must have the patience to resolve the issue peacefully," he said on Friday.
NORTH KOREA NUCLEAR PROGRAMME