It is a peninsula of limestone — calcium carbonate rock laid down in ancient shallow seas, layer upon layer, over tens of millions of years.

Limestone is soluble in slightly acidic water.

As rainwater percolates down through the ground, absorbing carbon dioxide from the soil and becoming mildly acidic, it slowly dissolves the limestone beneath.

Over millions of years, this process carves out what geologists call a karst landscape: a landscape riddled with underground cavities, tunnels, channels, and chambers.

The surface may appear relatively flat and solid, but beneath it lies a three-dimensional maze of voids filled alternately with air and water.

On the Yucatán, this process has been particularly extreme.