China on Tuesday expressed "firm opposition" to North Korea's nuclear test, saying its wayward ally had gone ahead with the blast "despite widespread opposition from the international community".

"We strongly urge the DPRK (North Korea) to honour its commitment to denuclearisation, and not to take any actions which might worsen the situation," the foreign ministry said in a statement posted on its website, using the official name for the North.

China is North Korea's most important backer, providing it with trade and aid that have enabled the state to survive for decades since the end of the Korean War.

But despite Chinese state-run media urging a tougher line in the run-up to the test, the foreign ministry statement contained no threat of any sanctions or reprisals.

"The Chinese government calls on all parties to respond calmly, solve the problem of denuclearisation of the peninsula through dialogue and consultation within the framework of the six-party talks," it said, in a re-iteration of Beijing's longstanding position.