North Korea has sanctioned its status as a nuclear power by law, reports the state news agency KCNA.
"Today we have completed a historic mission," said North Korean leader Kim Jong-un.
The new law that allows the state to carry out a preventive nuclear attack on a country that is believed to represent an imminent threat to Pyongyang.
It also allows you to automatically hit an opponent if the country is attacked.
North Korea will not engage in denuclearization talks in the future, Kim said.
"Possession of nuclear weapons is our legitimate and inalienable right. We have no plans to refuse nuclear weapons. The new law makes denuclearization talks impossible," the North Korean leader said.
At the same time, North Korea undertakes not to sell nuclear weapons and technologies to other countries in accordance with the new law adopted.
Pyongyang will continue to strengthen its nuclear potential and expand its capabilities to use nuclear weapons, Kim added.