North Korea has warned China of “grave consequences” in a rare media rebuke which exposes growing divisions between the two historically close allies.

Beijing has shown increasing concern towards Pyongyang’s nuclear weapons programme over fears that it is prompting the United States, Japan and South Korea to build up their militaries in the region.

The North’s state-run Korean Central News Agency (KCNA) took aim at "a string of absurd and reckless remarks” from Chinese media towards the regime’s nuclear ambitions.

“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 hard-hitting commentary said, referring to the country’s official name.

“China should no longer try to test the limits of the DPRK's patience... (and) had better ponder over the grave consequences to be entailed by its reckless act of chopping down the pillar of the DPRK-China relations.”