North Korea's decision to detonate a nuclear device underground Monday caught the United States by surprise, officials said.

"They didn't give us any warning whatsoever," one senior U.S. intelligence official who works on North Korean issues told FOX News.

Another official told Reuters that North Korea gave less than an hour's notice to the United States that it would carry out the test.

The official said the communist country made "no demands," and passed on the message that it would carry out the test through diplomats at the United Nations in New York City.

The senior intelligence official said that even after the demonstration at the Punggye nuclear test site, the only evidence of activity that analysts could see in aerial imagery was a "couple of spoil sites," or large holes.

"We saw some activity" at Punggye prior to the test, the official said. But the activity was not as intense as that which normally precedes a detonation, so few anticipated such an action at this time. "They are really good at hiding things from us."

John Bolton, former U.S. ambassador to the United Nations, was one of the few to predict the test. He wrote in a May 20 column in The Wall Street Journal that such a test would be more than just a "propaganda ploy," since most experts believe the country's 2006 test was flawed.

"The scientific and military imperatives for a second test have been strong for over two years, and the potential data, experience and other advantages of further testing would be tremendous," Bolton wrote last week.

North Korea also test fired the Musudan-Ri missile, on which Kim Jong Il could ultimately hope to place a nuclear device.

Daniel Pinkston, of the International Crisis Group in Seoul, said the new missile has a range of up to 2,500 miles and is capable of hitting Guam.

Pinkston said the missile had never been tested before Monday. It would be North Korea's third nuclear-capable missile in its arsenal.

FOX News' James Rosen contributed to this report.