The warning comes amid speculation that North Korea is preparing to conduct such a test to prove it has working nuclear wepaons.
Ban Ki-moon, the South Korean foreign minister, told reporters in Seoul on Wednesday any test would create a "threatening situation that will shake the foundation of the global non-proliferation system and will further isolate the North".
He said a test was a real possibility and Seoul was closely monitoring developments in the North as well as sharing intelligence with its neighbours and allies.
Last week, America's ABC news quoted unnamed US officials as saying suspicious activities had been detected at P'unggye-yok, a possible underground test site in North Korea.
"It is the view of the intelligence community that a test is a real possibility," a senior US State Department official told the network.
Recent missile tests have
sparked protest in South Korea
Indications of a possible test cited by US officials included intensified vehicle activity at the site and the unloading of reels of cable that could be used to monitor an underground detonation.
However, even with advanced spy satellites, preparations for underground tests are hard to detect.
In 1998, for example, US intelligence agencies failed to detect any signs of nuclear tests by India and Pakistan.
North Korea has claimed it has nuclear weapons but has never provided any evidence of their existence.
US intelligence reports have previously said North Korea may have enough nuclear material to build a dozen or more bombs.
A succesful North Korean test would remove any doubt that it has nuclear weapons, although it remains far from clear whether it has managed to build a bomb in a deliverable form.
The Taepodong 2 is thought to be
capable of hitting the US
Last month North Korea conducted a series of missile tests including a test of its Taepodong 2 missile, thought to be capable of reaching the continental United States.
A demonstration of the North's nuclear capability would likely add to unease among its neighbours and, some officials say, could spark a regional arms race pushing South Korea and Japan to develop their own nuclear weapons.
Six-nation talks on North Korea's nuclear programme have been stalled since November with Pyongyang refusing to return until Washington lifts the financial blacklisting for alleged counterfeiting and money laundering imposed on a bank where the communist regime held accounts.
South Korea and the United States have urged the North to return to the talks without conditions, saying the issue is unrelated to the nuclear talks, which also include China and Russia.