thumb|upright=1.3|Exposed and buried parts of Capitan Reef. Blue area shows area once flooded by the Delaware Sea.

The Delaware Basin is a geologic depositional and structural basin in West Texas and southern New Mexico, famous for holding large oil fields and for a fossilized reef exposed at the surface. Guadalupe Mountains National Park and Carlsbad Caverns National Park protect part of the basin. It is part of the larger Permian Basin, itself contained within the Mid-Continent oil province.

Geology

thumb|View looking south showing the flatness of the Delaware Basin. Image from the Walnut Canyon drive, [[Carlsbad Caverns National Park]]

By earliest Permian time, during the Wolfcampian Epoch, the ovoid shaped subsiding Delaware Basin extended over in what is now western Texas and southeast New Mexico. This period of deposition left a thickness of of limestone interbedded with dark-colored shale. Structurally the Delaware, Midland and Marfa were foreland basins created when the Ouachita Mountains were uplifted as the southern continent Gondwana collided with Laurasia, forming the supercontinent Pangea in the Late Carboniferous (Pennsylvanian). The Ouachita Mountains formed a rainshadow over the basins, and a warm shallow sea flooded the surrounding area. On the other side of the equator, the Ancestral Rocky Mountains formed a large mountainous island.

The Delaware Basin temporarily stopped subsiding in the Leonardian Epoch at the start of the mid-Permian. Small banks along its margin developed along with small discontinuous patch reefs in the shallow water just offshore. The first formation that resulted was the Yeso and consists of alternating beds of dolomitic limestone, gypsum, and sandstone. The sediments responsible for creating the Yeso were deposited in nearshore areas that graded into the carbonate banks of the Victorio Peak Formation in the deeper waters. Thin-bedded limestones of the Bone Spring Formation accumulated as limy ooze in the stagnant deepest part of the basin.

Sea level dropped as the late Permian glaciation intensified and locked increasing amounts of water in distant ice caps. Sedimentation continued to fill the Delaware Basin into the Ochoan Epoch of the upper Permian, periodically cutting the basin off from its source of seawater. Part of the resulting brine became the deep-water evaporites of the Castile Formation. The Castile consists of thick laminae of alternating gray anhydrite and gypsum, brown calcite, and halite. As the salt concentration increased, halite and potassium-rich salt precipitated from the briny body of water on its margin and on nearshore areas. This salt layer covered an increasingly large area as the water level dropped, forming the

Salado Formation.

Streams eroded the softer sediment away, lowering the ground level to its current position. Acidic groundwater excavated caves in the limestone of the higher areas and eroded sediment helped fill any remaining Permian-aged caves. Unlike most other caves in limestone, in this case the acid was likely derived from hydrogen sulfide and sulfide-rich brines that were freed by tectonic activity in the mid-Tertiary and mixed with oxygenated groundwater, forming sulfuric acid.