Blind valleys, aligned dolines, and openings leading to 50 to 70 m long, linear caves, developed entirely within the lower Cretaceous Cody Shale, are found along the west flank of a 150 m high and 7 km long ridge on the eastern side of the Bighorn Basin in north-central Wyoming. Precipitation events on a swelling soil allow water and oxygen to reach the shale a few meters below the surface and to react with pyrite in the shale. Microbially-assisted oxidation of the pyrite, possibly by Acidithiobacillus ferrooxidans, produces sulfuric acid that reacts with calcite in the shale, resulting in gypsum fracture fillings, observed as 2 to 4 cm thick beds on cave walls and sub-mm-diameter deposits within shale beds. Evidence for pyrite oxidation is provided by the presence of a ferric oxyhydroxide (goethite) as a by-product, visible as brown fillings on cave walls, confirmed by XRD. Stable sulfur isotope analysis, using gypsum samples taken from fracture fillings in the caves, was conducted with negative values for delta S-34 obtained (versus positive values for marine sulfate), providing additional evidence for pyrite as the source of sulfur in the gypsum. This was confirmed by SEM imaging of shale samples. These samples showed gypsum inclusions in the shale, biofilm-coated, framboidal pyrite pseudomorphs, and iron oxyhydroxide residue remaining on the framboidal surfaces, evidence for pyrite oxidation. The 2x molar-volume increase, resulting from calcite re-crystallization to gypsum and subsequent growth of gypsum crystals, leads to fracturing and separation of individual shale beds, reducing the structural integrity of the shale. Dis-associated shale beds along passage walls and rubble slopes of decomposed shale beneath the walls are evidence of shale decomposition. Subsequent dissolution of gypsum by meteoric water moving through beds and fractures in the shale results in the creation of small, localized voids. When wetted, the shale decomposes into micron-scale particles that are removed by episodic water flowing downslope. Sapping occurs at the places where sediment-laden water emerges, creating openings that progress headward. As material is removed on a grain-by-grain basis by corrasion, the small voids coalesce into more integrated spaces, ultimately permitting human entry.