China has appealed for calm following North Korea's announcement that it planned to test a nuclear bomb.
There have been protests in South Korea against the announcement
"We hope that North Korea will exercise necessary calm and restraint," a foreign ministry spokesman said, urging other states not to escalate tensions.
North Korea announced the test on state TV on Monday, saying it would boost security in the face of US hostility.
The US said such an action would be "provocative", while Japan said it would be "unacceptable".
The US has already indicated it would raise the issue with the UN Security Council, but Beijing says the issue should be handled by ongoing six-nation talks on North Korea's nuclear ambitions.
These talks have been stalled for almost a year, with Pyongyang refusing to return to the table unless the US first lifts financial sanctions.
Despite a flurry of diplomatic activity in recent months, after the North conducted internationally condemned missile tests, little progress has been made.
China, the nearest the North has to an ally, has often advocated quiet diplomacy in efforts to get Pyongyang to abandon its nuclear programme.
But other countries involved in the six-nation talks - notably the US and Japan - have frequently taken a harder line.
North Korea said its nuclear test would prove its claim, made publicly last year, that it had nuclear weapons.
KOREAN NUCLEAR CRISIS
Sept 2005:At first hailed as a breakthrough, North Korea agrees to give up nuclear activities
Next day, N Korea says it will not scrap its activities unless it gets a civilian nuclear reactor
US imposes financial sanctions on N Korea businesses
July 2006: N Korea test-fires seven missiles
UN Security Council votes to impose sanctions over the tests
Oct 2006: N Korea threatens nuclear test
Pyongyang did not give a date for its planned nuclear test, but North Korean diplomat Pak Myong-guk told the BBC the country had been forced to act because of Washington's stance.
"These kinds of threats of nuclear war and sanctions and pressure by the United States compel us to conduct a nuclear test," he said.
But there was little sympathy among the international community for Pyongyang's reasons.
Japan's new Prime Minister Shinzo Abe told parliament on Wednesday that Tokyo "simply could not accept if North Korea were to conduct a nuclear test".
South Korean Vice Foreign Minister Yu Myung-hwan has suggested that a North Korean nuclear test could provoke a regional arms race and "could provide a pretext for Japan's nuclear armament".
South Korea also warned that it might abandon its long policy of pursuing engagement with the North if the tests went ahead.
Russia and various other European nations have also expressed concern, and a spokesman for UN Secretary General Kofi Annan said a test would only provoke universal condemnation and do nothing towards strengthening North Korea's security.
But China said it would be better to revive the six-nation talks, which stalled almost a year ago.
"If the six-party talks cannot do anything about it, I don't think the Council is in a position to do it," China's envoy to the UN, Wang Guangya, told reporters.
North Korea is thought to have developed a handful of warheads but never before announced it would test one.
US and South Korean reports suggest the North has at least one underground test site.
The North appears increasingly angry at sanctions imposed by the US and other countries on North Korean businesses accused of arms sales and illegal activities.
In 2002, it restarted its nuclear reactor at Yongbyon and forced two UN nuclear monitors to leave the country. It is unclear how far work has progressed at the plant since then.