President Obama on Tuesday called North Korea's third successful nuclear test a "highly provocative act" that "undermines regional stability" and threatens action by the international community.

He said North Korea's nuclear program constitutes "a threat to U.S. national security."

The White House released the statement early Tuesday after North Korea detonated a miniaturized nuclear device at a northeastern test site, state media said, defying U.N. Security Council orders to shut down atomic activity or face more sanctions and international isolation.

U.N. Secretary-General Ban Ki-moon also condemned the test, saying it was "deplorable that Pyongyang defied the strong and unequivocal call from the international community to refrain from any further provocative measures."

The Security Council has reportedly scheduled an emergency meeting.

The underground explosion could take North Korea a big step closer to its goal of building a nuclear warhead small enough to be mounted on a long-range missile that could threaten the United States.

Official state media said the test was conducted in a safe manner and is aimed at coping with "outrageous" U.S. hostility that "violently" undermines the North's peaceful, sovereign rights to launch satellites. North Korea faced sanctions after a December launch of a rocket the U.N. and Washington called a cover for a banned missile test.

North Korea said the test was merely its "first response" to U.S. threats, and said it will continue with unspecified "second and third measures of greater intensity" if Washington maintains its hostility.

The North said it used a "lighter, miniaturized atomic bomb" that still has more explosive force than past tests.

Monitoring stations in South Korea detected an earthquake in the North with a magnitude of 4.9 and the South's Defense Ministry said that corresponds to an estimated explosive yield of 6-7 kilotons. The United States Geological Survey said earlier Tuesday that it had detected a 4.9-magnitude earthquake.

The nuclear test is North Korea's first since leader Kim Jong Un took power in December 2011 following the death of his father, Kim Jong Il, and marks a bold statement for the young leader as he unveils his domestic and foreign policy for a country long estranged from the West.

Experts say regular tests are needed to perfect North Korea's goal of building nuclear warheads small enough to be placed on long-range missiles. This atomic test - North Korea's third since 2006 - is expected to take Pyongyang closer to possessing nuclear-tipped missiles designed to strike the United States.

China expressed firm opposition to the test but called for a calm response by all sides.