The secretive nation is said to have thousands of underground facilities. They help keep weapons sites out of view -- and the U.S. military's reach.

SEOUL — Like so many worker ants, the North Korean soldiers spent their days underground in a vast labyrinth of tunnels.

Their daily commute involved walking down four steep flights of stairs, then passing through a corridor that went nearly 800 yards into a mountain. They carried tightly sealed cartons, believed to contain raw materials for North Korea's secret weapons programs. Some days, especially if they were being punished, they were assigned simply to dig more tunnels.

K., a North Korean in his 30s, was recruited at age 17 into an elite military unit working for the agency responsible for weapons production. He took an oath to work underground for the rest of his career and was assigned to a cave in remote Musan County in North Hamgyong province, about 15 miles from the Chinese border.

"This is how we hide from our enemies. Everything in North Korea is underground," said K., who described the cave on condition that he be quoted using only his first initial and that certain identifying details be kept vague.

North Korea is riddled with caves like the one in which K. worked. Under its paranoid regime, virtually everything of military significance is manufactured underground, whether it's buttons for soldiers' uniforms or enriched uranium for nuclear weapons. A South Korean intelligence source estimates North Korea has several hundred large underground factories and more than 10,000 smaller facilities. Joseph S. Bermudez Jr., the author of three books on the North Korean military, puts the total number between 11,000 and 14,000.

Whatever the count, there are enough underground facilities that a popular joke has the country eventually collapsing not from the failure of its communist economic system but from so much burrowing in the dirt.

"The place is like Swiss cheese, there are so many holes," said John Pike, a defense analyst with GlobalSecurity.org, a consulting firm in Alexandria, Va.

North Korea's relentless tunneling has had a profound effect on the U.S. debate over how to respond to its drive to build nuclear weapons. It makes the option of preemptive military action far less viable, because so much of the nuclear program is underground and out of reach.

Even if the Pentagon were to develop nuclear "bunker-busters" -- relatively small bombs that penetrate the surface before exploding -- the United States would be hard-pressed to use them successfully without knowing which of the thousands of bunkers scattered throughout the country were the correct targets.

The North Koreans began tunneling after the 1950-53 Korean War, when U.S. bombing destroyed most of their industrial base and infrastructure. North Korea's founder, the late Kim Il Sung, is believed to have been so awed by American air power that he directed key industrial facilities to be built underground.

"The entire nation must be made into a fortress," Kim wrote in 1963. "We must dig ourselves into the ground to protect ourselves." North Korea's mountainous topography, inhospitable for agriculture and transportation, proved to be singularly well suited to the nation becoming what Bermudez calls the "most heavily fortified country in the world."

The nation of 22 million people created the fifth-largest army in the world, with the mountains providing natural cover for its military infrastructure.

"We would dig horizontally into the mountains rather than going straight down because we didn't have good technology for waterproofing and we didn't want to run into the water table," said Lim Young Sun, a North Korean defector who worked from 1980 to 1993 in a construction bureau assigned to build underground facilities.

Lim said the North Koreans used mostly Japanese tunneling techniques, although more modern equipment was later imported from Europe.

In the countryside, small entryways can be seen dug into the sides of many hills, covered with slabs of concrete. "As you travel around and look around, you see that what looked like a regular hill is actually a bunker. It takes a while for your eyes to adjust and to make the mental shift, but after a while, you realize that all of North Korea is an underground facility," said Peter Hayes, who has traveled several times to North Korea and is executive director of the Nautilus Institute, a Berkeley think tank.

Above the demilitarized zone that divides the Korean peninsula, the North Koreans have put an estimated 13,000 heavy artillery pieces into mountain bunkers. The doors face north -- the artillery is positioned to quickly slide in and out on rails -- so that South Korean and U.S. troops stationed south of the DMZ can't reach them.

North Korean tunneling activity hasn't stopped at the border. Over the years, four infiltration channels have been discovered in South Korean territory. Based on defector testimony, South Korean investigators believe that as many as 20 more may still be hidden beneath the earth.