In a rare critique of its key ally, North Korea has accused China of appearing to be “friendly” while “dancing to the tune of the US”.

File photo from 2012 shows Chinese paramilitary policemen building a fence near a concrete marker depicting the North Korean and Chinese national flags with the words "China North Korea Border" at a crossing in the Chinese border town of Tumen in eastern Jilin province. (AP)

China said on Friday said it will continue complying with UN Security Council sanctions against its ally North Korea but chose not to directly comment on a rare and bitter critique of its policy released by Pyongyang’s official media.

In a commentary published by official Korea Central News Agency (KCNA), Pyongyang sharply criticised Beijing for appearing to be “friendly” but “dancing to the tune of the US”.

The commentary didn’t name China but it was a reaction to Beijing suspending coal imports from North Korea after it fired a nuclear-capable ballistic missile earlier this month.

Coal is the dictatorial Communist regime’s main export and the suspension is expected to deprive the country of crucial foreign exchange.

China is North Korea’s key ally and economic benefactor.

“This country, styling itself a big power, is dancing to the tune of the US, while defending its mean behaviour with such excuses that it wasn’t meant to have a negative impact on the living standards of people in the DPRK but to check its nuclear programme,” the KCNA commentary said.

The commentary sharply criticised the “big power” for “unhesitatingly taking inhumane steps such as totally blocking foreign trade related to the improvement of people’s living standards”.It added the nation had joined North Korea’s enemies to “bring down its social system”.

China’s foreign ministry spokesperson Geng Shuang said on Friday that the country would fully enforce UN Security Council resolutions.

"According to our statistics, China has already approached the upper limits of coal imports from North Korea. So because of this, we have stopped imports of coal from North Korea with a responsible attitude,” Geng said without responding to a question whether Beijing’s decision could impact the lives of North Koreans.

On Thursday, China’s defence ministry denied reports it had increased troops along the border with North Korea following the missile test and the mysterious murder of the North’s leader Kim Jong-un’s half-brother in Malaysia.

“As for the reports mentioned of the People's Liberation Army increasing troops on the Chinese-North Korean border, they are totally baseless and completely fabricated,” defence ministry spokesman Ren Guoqiang told a news briefing.

South Korean and US officials say the North Korean leader's half-brother, Kim Jong-nam, was killed by North Korean agents, a claim not acknowledged by Pyongyang.