PYONGYANG, North Korea (AP) — North Korea said Tuesday that its widely condemned nuclear test was merely its “first response” to what it called US threats, warning that it will continue with unspecified “second and third measures of greater intensity” if the United States maintains its hostility.

The United States and others called the test a violation of UN resolutions. Even North Korea’s only major ally, China, voiced opposition. But the North’s Foreign Ministry said in a statement that the test was a “self-defensive measure” that does not violate any international law.

The underground nuclear test in the remote, snowy northeast could be a crucial step toward the North’s goal of building a bomb small enough to be fitted on a missile capable of striking the United States.

President Barack Obama, who was scheduled to give a State of the Union address later Tuesday, said nuclear tests efforts “do not make North Korea more secure.” Instead, North Korea has “increasingly isolated and impoverished its people through its ill-advised pursuit of weapons of mass destruction,” he said in a statement.

The test was a defiant response to UN orders that North Korea shut down its atomic activities or face more sanctions and international isolation, as well as a direct message from young leader Kim Jong Un to the United States, the North’s No. 1 enemy since the 1950-53 Korean War.

North Korea was punished by more UN sanctions after a December launch of a rocket that the UN and Washington called a cover for a banned missile test. The North said it was a peaceful, and successful, bid to send a satellite into space.

The timing is significant. The test in an underground tunnel came hours before Obama’s speech and only days before the Saturday birthday of Kim Jong Un’s father, late leader Kim Jong Il, whose memory North Korean propaganda has repeatedly linked to the country’s nuclear ambitions.

This year also marks the 60th anniversary of the signing of the armistice that ended the 1950-53 Korean War, and in late February South Korean President-elect Park Geun-hye will be inaugurated.

Copyright 2013 The Associated Press.