North Korea on Tuesday conducted an underground explosion of what it called a “miniaturized” nuclear weapon, testing a technology that could theoretically be paired with a long-range missile to threaten the United States.

Pyongyang confirmed the test nearly three hours after unusual seismic activity was detected near the secretive police state’s mountainous test site. The test follows weeks of threats from the North to build up its nuclear capacity and carry out an “all-out action of high intensity.”

Following a flurry of activity at the site — where tests were previously conducted in 2006 and 2009 — North Korea recently removed most of the men and equipment from the location, an apparent sign the test was about to be conducted, according to South Korea’s Yonhap news agency. A Japanese government spokesman said the United States government was informed Monday that a blast could be imminent.

The U.S. Geological Survey detected a 4.9-magnitude tremor at 11:58 a.m. local time in North Korea.

The test is the first under new North Korean leader Kim Jong Eun and the clearest sign that the third-generation leader, like his father and grandfather, prefers to confront the United States and its allies rather than make peace with them.

Timeline: Highs and lows in the relationship between North and South Korea

Even before Pyongyang confirmed the test, the U.N. Security Council called for an emergency meeting to take place later in the day. Japan called for a “stern” international response and said it would consider adding sanctions of its own. In the upcoming Security Council meeting, attention will again turn to China, the North’s closest ally, where officials in recent weeks tried to dissuade the North from conducting its third nuclear test.

The blast comes two weeks before the inauguration in South Korea of President Park Geun-hye, who has said she is willing to cautiously reengage with the North after a five-year period of little economic or diplomatic contact between the two Koreas. By conducting the test in the final days of President Lee Myung-bak, analysts said, the North seemed to be giving a final reminder about the consequences of Lee’s relative hard-line stance. Under Lee, the North not only conducted two nuclear tests but also test-fired three rockets and also carried out two fatal attacks on the South.

North Korea, though facing international pressure to give up its weapons program, has used nuclear weapons as the backbone of its military strength. Analysts said the country wanted to conduct a third nuclear test as a way to hone smaller but more powerful nuclear devices — allowing it to mount a nuclear weapon on an intercontinental ballistic missile.

The test also comes two months after the North sent a long-range rocket into orbit, which Pyongyang said was carrying a satellite for scientific purposes. That rocket blast, which the United States and its allies called a de facto missile test, prompted the Security Council to strengthen sanctions against the North.

The latest blast, based on early indications, is slightly more powerful than earlier efforts, which registered as 4.1- and 4.5-magnitude earthquakes. South Korea’s defense ministry, according to Yonhap, said the initial explosion had given off a 10-kiloton yield, compared with the 12-to-20-kiloton yield of a Hiroshima-type device.

Earlier tests delivered yields of 1 kiloton and between 2 and 7, according to the Bulletin of the Atomic Scientists.

South Korean officials, though publicly opposed to North Korea’s nuclear tests, have said in recent days that a third test would lend vital new clues about their neighbor’s technological capabilities. The North, several years ago, made an apparent decision to phase out its plutonium program and build up its uranium program. Though the North still has some leftover plutonium on its hands, analysts have suspected that future North Korean nuclear tests will depend on highly enriched, or weapons-grade, uranium.

Uranium is preferable to plutonium because its facilities are easier to hide, said Siegfried Hecker, an atomic scientist who visited the North’s Yongbyon nuclear facility several times. Plutonium depends on a reactor, and any work at the reactor can be picked up by satellites.

Foreign analysts, though, knew nothing definitive about the North’s uranium enrichment efforts until Hecker, during a 2010 tour of Yongbyon, was invited into a long, warehouse-like building with a blue roof. There, Hecker was shown 2,000 new centrifuges, capable of producing either low-enriched uranium (for energy) or high-enriched uranium.

The North Korean officials told Hecker the centrifuges were only for peaceful purposes. “But we can’t see into the building,” Hecker said, so there is no way to know what they are doing now.