Pervasive early- to late-diagenetic dolomitization of Lower Ordovician Ellenburger carbonates in the deep Permian Basin is recorded in core samples having present-day burial depths of 1.5 to 7.0 km. Petrography, geochemistry, and paragenetic relation of dolomite-rock textures indicate that Ellenburger carbonate rocks were subjected to a complex diagenetic history ranging from early shallow-subtidal dolomitization to late diagenetic deep-burial dolomitization. Fine-crystalline planar replacement dolomite of precursor lime muds formed during early diagenesis in a subtidal to peritidal setting under near-surface, low-temperature conditions, with Mg (super 2+) supplied by diffusion from overlying seawater. During intermediate burial (500-2000 m), medium- to coarse-crystalline planar-s dolomite replaced allochems and matrix or occurred as void-filling. Planar-e dolomite precipitated along walls of pores and fractures or formed porous mosaics of medium- to coarse-euhedral crystals. Nonplanar-a dolomite replaced a precursor limestone/dolostone only in zones that are characterized by original high porosity and permeability. During deep-burial (> 2000 m) nonplanar dolomite cement (saddle dolomite), calcite, and authigenic quartz precipitated in and occluded fractures and pore-space. The nonplanar dolomite cement is typically enriched in calcium (mean = 52.6 mole % CaCO 3 ) and iron (mean = 6635 ppm). Burial-history and thermal maturation calculations suggest that deep-burial dolomite cementation occurred during the Late Pennsylvanian/Early Permian. Inter- and intracrystalline dissolution surfaces are observed within the paragenetic sequence. Major truncation surfaces between early replacement dolomites and later void-filling dolomites, and between planar and nonplanar dolomite cements are evidence for dolomite dissolution. Deep-discharge of meteoric fluids as a result of frequent periods of karsting in overlying strata, and long-distance fluid migration during the Ouachita orogeny from foreland basins to the south are invoked for sources of undersaturated fluids causing dolomite dissolution and creating matrix-porosity in the deep subsurface. Dissolution of precursor dolomite may also provide a source of Mg (super 2+) for late-stage dolomite cements. Similar diagenetic relationships have been described from deeply-buried carbonate rocks elsewhere, indicating that trends and timing of dolomitization, dissolution and porosity formation, and cementation by late dolomite and calcite are intimately related to the evolution of sedimentary basins. The origin of massive dolostones, such as the Ellenburger, is best explained in the context of basin evolution, rather than by a single model of dolomite formation.