The White House released a statement Tuesday after North Korea said it detonated a nuclear device at a test site in the northeast of the country, defying U.N. Security Council directives that it to halt atomic activity or face more sanctions and international isolation.

U.N. Secretary-General Ban Ki-moon 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."

Other international leaders also condemned the latest nuclear test by North Korea which irked its allies, China and Russia an flies in the face of opposition to weapons of mass destruction by most Christian and other religious organizations.

Japanese Prime Minister Shinzo Abe, which is a neighbor of North Korea, called the test a "grave threat" that could not be tolerated.

Russia's foreign ministry condemned the test, saying in an official statement, "We insist on North Korea putting an end to all illegal actions, complying to all U.N. Security Council orders, and fully giving up nuclear missile programs."

In a farewell speech at the Pentagon, Panetta said the United States would continue to be tested by unpredictable regimes in years to come.

"We're going to have to deal with weapons of mass destruction and the proliferation. We're going to have to continue with rogue states like Iran and North Korea.

(Photo: Reuters Graphics)Map locating the site where North Korea conducted an underground nuclear test on Tuesday.

"We just saw what North Korea's done in these last few weeks - a missile test and now a nuclear test. They represent a serious threat to the United States of America. We've got to be prepared to deal with that."

China, North Korea's main ally, has used its veto in the U.N. Security Council to Pyongyang's advantage but it called North Korea's ambassador to Beijing to express its concern over the test.

The BBC reported that North Korean Foreign Minister Yang Jiechi delivered a "stern representation"' to Ji Jae Ryong and expressed China's "strong dissatisfaction and firm opposition'' to the test, the Chinese foreign ministry said in a statement.

China urged the North to honor its commitment to denuclearization and "not take any actions which might worsen the situation."

The test was condemned by North Korea's other immediate neighbors, South Korea.

South Africa, which gave up its armed nuclear capability in the 1990s, condemned the latest nuclear test conducted by North Korea.

"Since the announcement by the Democratic People's Republic of Korea in February 2005 that it had developed a nuclear weapon [of] deterrent capability, South Africa has consistently called on the DPRK to verifiably dismantle any nuclear weapons," South Africa's department of international relations and co-operation said on Tuesday.

"[It also called for DPRK to] return to the Nuclear Non-Proliferation Treaty (NPT) without delay, place all its facilities under comprehensive International Atomic Energy Agency (IAEA) verification, and to contribute through strengthened confidence-building measures to global nuclear disarmament and nuclear non-proliferation."