"China will oppose anything which might jeopardize peace and stability on the Korean peninsula and in Northeast Asia, as this would damage China's national security interests and the interests of the relevant parties as well," Chinese Vice Foreign Minister Cui Tiankai told a news briefing.
"Peace and stability on the Korean peninsula and in Northeast Asia bear on China's national interest and also bear on the interests of all relevant parties," he said.
"We believe that no party should take any action that might escalate tensions," said Cui, who studied at Johns Hopkins University in Washington and worked at the United Nations in New York before taking on his current position.
Beijing's Global Times newspaper, an organ of China's ruling Communist Party, separately published a commentary strongly opposing a North Korean nuclear test, warning Beijing would not be able to shield North Korea from the diplomatic consequences if it goes ahead with the test.
U.S. Defense Secretary Leon Panetta warned North Korea Tuesday not to conduct another nuclear test, saying it would create "greater instability in a dangerous part of the world."
"I strongly urge North Korea not to engage in any further provocations," Panetta said at a news conference in Brazil during a South American tour.
North Korea became the world's eighth atomic power in 2006 when it conducted an underground nuclear-weapons test. It conducted a second nuclear test in 2009.
The country, under supreme leader Kim Jong Un, defied international pressure again two weeks ago, launching a multistage rocket that Washington contended was a missile-technology test -- but the rocket blew up less than 2 minutes into flight and parts crashed in the Yellow Sea off South Korea.
Pyongyang claimed the rocket was supposed to put an "earth observation satellite" into space.
White House Press Secretary Jay Carney said despite the failure, North Korea's "provocative action threatens regional security, violates international law and contravenes its own recent commitments."
The U.N. Security Council censured Kim's government after the rocket launch. Pyongyang was already under Security Council sanctions for the two nuclear tests.
South Korean Foreign Ministry spokesman Cho Byung-je warned this week a new nuclear test would violate the sanctions and further isolate the impoverished country.
South Korea's intelligence agency said it could not confirm a Kyodo News Service report Moscow was on alert, anticipating a North Korean nuclear test within a week.
North Korea shares land borders with China and Russia to the north, and borders South Korea along the Korean Demilitarized Zone.
North Korea Monday accused Seoul and South Korean news media of slandering its leadership and threatened "special" military actions that would "reduce all the rat-like groups and the bases for provocations to ashes in three or four minutes."
U.N. Secretary-General Ban Ki-moon, born in what is now South Korea at the end of the Japan's Korean rule, urged North Korea to refrain from "further provocative measures."
He told reporters in New York Monday such actions would "not be desirable for the peace and stability of the Korean peninsula."
North Korea followed its Monday threats with an article Thursday titled, "Still Do Not Understand Our Will to Retaliate?"
The article in the pro-North Web site Uriminzokkiri criticized Seoul for labeling Monday's warning "psychological warfare."
"Our revolutionary armed forces never say empty words," the Web site said. "It is a miscalculation if [Seoul] thinks that [retaliation] will be on the same level as the artillery attack on Yeonpyeong Island."
North Korea fired an estimated 170 artillery shells and rockets at Yeonpyeong, 7.5 miles south of North Korea, Nov. 23, 2010, killing four South Koreans and injuring 19.
South Korea retaliated by shelling North Korean gun positions.
Pyongyang later said it had responded to South Korean shells being fired into North Korean territorial waters.
The United Nations declared the incident one of the most serious violations of the July 1953 armistice that ended the Korean War.