A North Korean foreign ministry official says having nuclear weapons is a "matter of life or death", in a wide-ranging and aggressive statement aimed at the US.

Any attempt to place sanctions on the country will be viewed as a "declaration of war", according to the statement.

The official also vowed that the country would fight "fire with fire" amid increasing nuclear tensions on both sides, according to an RIA news agency report. That may be a reference to Donald Trump's threat to unleash "fire and fury the likes of which the world has never seen before" on North Korea.

The threat comes amid warnings from US officials that North Korea is "on the cusp" of perfecting its nuclear weapons. "They are close enough now in their capabilities that from a US policy perspective we ought to behave as if we are on the cusp of them achieving" the ability to strike the US with a nuclear weapon, CIA Director Mike Pompeo warned.

In pictures: North Korea military drill Show all 8 1 /8 In pictures: North Korea military drill In pictures: North Korea military drill North Korea's leader Kim Jong Un watches a military drill marking the 85th anniversary of the establishment of the Korean People's Army (KPA) KCNA/Handout via REUTERS In pictures: North Korea military drill A military drill marking the 85th anniversary of the establishment of the Korean People's Army (KPA) is seen in this handout photo by North Korea's Korean Central News Agency (KCNA) KCNA/Handout via REUTERS In pictures: North Korea military drill A military drill marking the 85th anniversary of the establishment of the Korean People's Army (KPA) is seen in this handout photo by North Korea's Korean Central News Agency (KCNA) KCNA/Handout via REUTERS In pictures: North Korea military drill A military drill marking the 85th anniversary of the establishment of the Korean People's Army (KPA) KCNA/Handout via REUTERS In pictures: North Korea military drill A military drill marking the 85th anniversary of the establishment of the Korean People's Army (KPA) KCNA/Handout via REUTERS In pictures: North Korea military drill This image made from video of still images broadcast in a news bulletin by North Korea's KRT, shows what was said to be a 'Combined Fire Demonstration' held to celebrate the 85th anniversary of the North Korean army, in Wonsan, North Korea. KRT via AP Video In pictures: North Korea military drill This image made from video of still images broadcast in a news bulletin by North Korea's KRT, shows what was said to be a 'Combined Fire Demonstration' held to celebrate the 85th anniversary of the North Korean army, in Wonsan, North Korea. KRT via AP Video In pictures: North Korea military drill This image made from video of still images broadcast in a news bulletin by North Korea's KRT, shows what was said to be a 'Combined Fire Demonstration' held to celebrate the 85th anniversary of the North Korean army, in Wonsan, North Korea. KRT via AP Video

The US will have to "put up with" North Korea's nuclear status, the official said in Moscow, making clear that Pyongyang has no plans to hold talks with the US.

"This is a matter of life and death for us. The current situation deepens our understanding that we need nuclear weapons to repel a potential attack," said Choe Son-hui, director-general of the North American department of North Korea's foreign ministry, told a non-proliferation conference in Moscow, RIA reported.