The Cotton Valley sandstone in the East Texas basin was deposited in a progradational sequence of shallow marine and fluvial-deltaic environments. Along the eastern flank of the basin, natural gas is produced from low porosity and low-permeability reservoirs which have been stimulated by massive hydraulic fracturing. These sandstones are very fine-grained, well-sorted quartz arenites and subarkoses. Principal framework constituents are monocrystalline quartz and feldspars. The sandstones have a complex diagenetic history and are cemented by authigenic quartz, calcite, phyllosilicates, and iron oxides. The most common paragenetic sequence is (1) development of clay coats on grains, (2) formation of syntaxial overgrowths, (3) dissolution of unstable grains followed by precipitation of phyllosilicates, (4) precipitation of calcite in relict primary and secondary pores, and (5) replacement of grains by calcite resulting in a poikilotopic texture. Cotton Valley sandstones are classified by R-mode factor analysis into three groups which can be related to porosity characteristics. Type I rocks are tightly cemented by quartz and calcite and make a poor reservoir. Type II rocks have a high phyllosilicate content and abundant microporosity that may produce gas. Type III rocks have a high content of unstable grains and have well developed secondary porosity which can be of reservoir quality. Although there is an overlap in rock types due to inhomogeneity of the formation, end-member lithologies can be discriminated on the basis of log calculations of porosity and water saturation. Depositional environments were a major control on diagenesis. Clean sands deposited in high-energy environments became tightly cemented by silica overgrowths and sparry calcite. Sands deposited in lower energy environments contained detrital clays that inhibited nucleation of overgrowths and helped preserve porosity.--Modified journal abstract.