North Korea will not “beg” to maintain the friendship of its major ally, China, North Korean state media have said in rare remarks against Beijing.

In a commentary published by the North’s official Korean Central News Agency (KCNA) on Wednesday, Pyongyang rejected as “reckless” demands by China that North Korea denuclearize.

“A string of absurd and reckless remarks are now heard from China every day only to render the present bad situation tenser,” it said.

The commentary said China’s call for Pyongyang to dismantle its nuclear program was “a wanton violation of the independent and legitimate rights, dignity and supreme interests” of North Korea.

The commentary even warned Beijing not to test the limits of the North’s patience.

“China had better ponder over the grave consequences to be entailed by its reckless act of chopping down the pillar of the DPRK-China relations,” it said, using an acronym for the Democratic People’s Republic of Korea, North Korea’s official name.

A file photo shows North Korean soldiers parading through Kim Il-sung Square with their missiles and rockets during a mass military parade in the capital, Pyongyang. (By AP)

It said North Korea’s nuclear program was needed for the “existence and development” of the country and “can never be changed nor shaken.”

“The DPRK will never beg for the maintenance of friendship with China, risking its nuclear program, which is as precious as its own life, no matter how valuable the friendship is,” the commentary said.

Tensions on the Korean Peninsula have significantly spiked in recent weeks. The US, concerned by North Korea’s rapidly-developing missile and military nuclear programs, has sent a strike force to the peninsula. Pyongyang has said it is combat-ready. The two sides have been increasingly trading threats of military action against one another.

Amid the recent tensions, the US has called on China, which is also North Korea’s major economic benefactor, to help increase pressure on Pyongyang to have it abandon its nuclear program. While China has opposed any military action against North Korea, it has long maintained that Pyongyang should not have a military nuclear program and has recently increased pressure on Pyongyang, including by imposing sanctions of its own.

Pyongyang, already under a raft of sanctions for its missile and nuclear programs, says it is developing arms as deterrence against the US threat. North Korea has also said that it would not abandon its missile and nuclear programs unless the US ended its hostility toward Pyongyang.