North Korea's state TV said the North was now capable of mounting nuclear warheads on ballistic rockets. It said no leakage of nuclear material had occurred in the test and that there was no environmental impact.

The quake was detected near North Korea's Pyunggye-ri nuclear test site as the country celebrates Foundation Day, which marks the anniversary of the founding of the nation in 1948.

Seoul's meteorological agency said the tremor, detected by quake monitors around the world including in the US and Europe, was likely to be the nation's fifth nuclear test, according to Yonhap.

"The artificial 5.0-magnitude earthquake in the North... is likely a nuclear test," a South Korean meteorological agency official said according to the Yonhap news agency.

"There is a high possibility that it was a nuclear test, given the location and the magnitude of the quake," another unidentified government official told Yonhap.

Seoul's military also said it was analysing the nature of the tremor. North Korea has been hit by five sets of United Nations sanctions since it first tested a nuclear device in 2006.

It has also conducted a series of missile tests this year in defiance of UN sanctions. It also test-fired three ballistic missiles Monday as world powers gathered for a G20 meeting in China, with leader Kim Jong-Un hailing the tests as "perfect", and US President Barack Obama warning it would only up the pressure.

The Japan Meteorological Agency official said the seismological data was unusual and that it was now analysing the data.

"The form of the wave is different than in a normal quake," the official said according to public broadcaster NHK.

A nuclear test is another slap in the face to the North's chief ally China and diminishes any chance of a resumption of six-country talks on North Korea's nuclear programme.

After a previous nuclear test in 2013, the North restarted a plutonium reactor that it had shut down at its Yongbyon complex in 2007 under an aid-for-disarmament accord.