China's Foreign Ministry said North Korea's nuclear test would damage ties between the allies who sided against American-led U.N. forces in the Korean War.
"The nuclear test will undoubtedly exert a negative impact on our relations," Chinese Foreign Ministry spokesman Liu Jianchao told reporters.
But Liu added that China is "firmly against" a military strike against the North.
"Taking military action against North Korea would be unimaginable," he said.
China also has long opposed sanctions sought by countries such as the United States, which is pressing for potentially crippling new measures against Pyongyang.
A permanent U.N. Security Council member, China has a decisive say over how stern a punishment the international community can mete out to North Korea.
A South Korean envoy, returning to Seoul from Beijing, said Tuesday that China appeared to be leaning toward backing strong U.N. measures.
The North stepped up its threats aimed at Washington, saying it could fire a nuclear nuclear-tipped missile unless the United States acts to resolve its standoff with Pyongyang, the Yonhap news agency reported Tuesday from Beijing.
Even if Pyongyang is confirmed to have nuclear weapons, experts say it's unlikely the North has a bomb design small and light enough to be mounted atop a missile. Their long-range missile capability also remains in question, after a test rocket in July apparently fizzled out shortly after takeoff.
"We hope the situation will be resolved before an unfortunate incident of us firing a nuclear missile comes," Yonhap quoted an unidentified North Korean official as saying. "That depends on how the U.S. will act."
The official said the nuclear test was "an expression of our intention to face the United States across the negotiating table," reported Yonhap, which didn't say how or where it contacted the official, or why no name was given.
But Alexander Vershbow, the U.S. ambassador to South Korea, told reporters that the nuclear test would make the possibility of direct talks between Washington and Pyongyang more difficult, Yonhap reported.
The U.N. Security Council was weighing a U.S. proposal for potentially crippling sanctions. America has asked the council to adopt a measure that would aim to curb the North's nuclear and ballistic missile programs, prohibit all trade in military and luxury goods, and crack down on illegal financial dealings.
There have been worries that the reported nuclear test would prompt Japan to build its own bomb. But Japanese Prime Minister Shinzo Abe told lawmakers Japan's anti-nuclear policy would remain unchanged.
"There will be no change in our non-nuclear arms principles," Abe said.
Japan's pacifist constitution bars the use of force to settle international disputes, and Japan has maintained a policy of not producing, possessing or using nuclear weapons.
Abe may be saying that now, but if North Korea continues this brinkmanship, he may be forced to start down that path. In fact, he probably will be force to do it fairly soon. But if China actually backs sanctions authorized under chapter 7 of the UN Charter, we'll know China is sick and tired of the mad midget of Pyongyang.