North Korea said it has carried out a successful "nuclear warhead explosion" test to counter what it called US hostility, North Korean state TV reported, angering neighbours and the United States.
An earthquake with a magnitude of 5.3 was detected in the country's north on Friday morning, South Korea's meteorological agency said, in what officials said was the biggest ever such blast.
A state TV presenter said: "Scientists [from] ... the DPRK carried out a nuclear explosion test for the judgment of the power of a nuclear warhead newly studied and manufactured by them at the northern nuclear test ground."
The Democratic People's Republic of Korea is the North's official name.
"The Central Committee of the [ruling] Workers' Party of Korea sent warm congratulations to nuclear scientists ... of the northern nuclear test ground on the successful nuclear warhead explosion test," the presenter said.
The test would also enable the North to produce "as many as it wants [of] a variety of smaller, lighter and diversified nuclear warheads of higher strike power", she said.
The tremor, detected by the US Geological Survey and Japan's Meteorological Agency's earthquake and tsunami observations division, happened near a known nuclear test site.
In January, North Korea detonated its fourth nuclear device at the same site.
READ MORE: World leaders unite to condemn nuclear test
The USGS said the explosion was detected at 9:30am local time at the surface. Its epicentre was 18km northeast of Sungjibaegam, the USGS said.
South Korean President Park Geun-hye called the test an act of "fanatic recklessness" in clear violation of UN Security Council resolutions.
US President Barack Obama and Park spoke by telephone about the event, South Korea's presidential office said. The 15-minute conversation took place as the US leader was on Air Force One returning to the US from a regional summit in Laos, according to the South Korean presidential office.
Obama said any provocative actions by North Korea would have "serious consequences", reiterating a US commitment to the security of its allies in Asia and around the world.
Japan's chief government spokesman said that Tokyo would consider further unilateral sanctions against North Korea.
READ MORE: North Korea says US sanctions are 'an act of war'
"North Korea's nuclear development is a grave threat to Japan's safety," Chief Cabinet Secretary Yoshihide Suga told a news conference.
China "firmly opposes" the test, the foreign ministry of Pyongyang's main diplomatic ally said.
"Today, the DPRK again conducted a nuclear test despite widespread international opposition - the Chinese government firmly opposes this," the ministry in Beijing said in a statement on its website, using the North's official name.
Analysis from Al Jazeera's Harry Fawcett, reporting from Seoul.
"In the wake of this test, there have been very strong words from South Korea but those kinds of strong words from the South or the UN Security Council or anyone else have so far done nothing to slow down what has been going on under the leadership of Kim Jong-un.
Here in Seoul, we've heard from defence sources who say this was likely to have been a 10 kiloton-test.
But two tests in the same year tells us this is an accelerated programme under the leadership of Kim Jong-un. He has written into the constitution of the country this dual pronged economic development and the pursuit of a viable nuclear deterrent - that is clearly what he wants to do.
There has been a great deal of long range rocket and missile testing - just this year we have seen the Musudan missile tested for the first time. At the end of August, we saw a submarine-launched ballistic missile.
Kim is getting to the point where he has what he wants, which is a diversified means of carrying a nuclear warhead.
That would be a major deterrent, in the North Korean leadership's view, of any kind of forced regime change upon them. Obviously, the North Koreans think this is critical to the survival of the regime, and they have upped the stakes and increased the pace of their nuclear development.
Source: Al Jazeera And Agencies