Read the story
Look southwest from the visitor center and you'll see a long limestone wall, the Guadalupe Escarpment. It looks like a mountain. It is a reef.
Roughly 265 million years ago, this desert was the edge of a shallow inland sea. Sponges and algae, not coral, built a reef along its rim: a horseshoe more than 400 miles long and over 1,800 feet thick, curving around a deep hollow called the Delaware Basin.
The first geologist to come through was George Shumard, with Captain John Pope's railroad survey in 1854. His brother saw that the fossils he collected resembled those of Europe's Permian rocks. In 1901, G. H. Girty gathered more and settled it: these mountains were Permian.
Nobody yet saw the shape of the thing. That took oil. After a 1920 strike in Winkler County, Texas, petroleum geologists swarmed the region and found its rocks bewilderingly complicated. Before 1930, several of them, almost at once, recognized why: a great barrier reef split the landscape, with shelf rocks to the northwest and basin rocks to the southeast. Among their papers was E. R. Lloyd's 1929 study, titled plainly "Capitan limestone and associated formations."
Philip B. King mapped the ground in detail and, in the 1940s, laid out how reef and basin fit together. In 1953, Norman Newell and his colleagues published a landmark study of the reef's ancient ecology. The rock lent its name to a slice of geologic time, the Capitanian.
After the sea vanished, thousands of feet of sediment buried the reef for tens of millions of years. Then, over the past 20 million, faulting lifted it almost 10,000 feet, and erosion stripped it bare. Acid born of hydrogen sulfide hollowed it from within. Most of Carlsbad Cavern lies inside the Capitan Limestone.
So when you ride the elevator down here, you aren't just entering a cave. You are descending into the heart of an ancient sea's reef.