The limestone portion exhibits diagenetic fabrics characteristic of marine phreatic and freshwater phreatic diagenesis. The former is indicated by 1) micritic envelopes, micritized shells, and bored grains, and 2) nonferroan calcite cement in isopachous crusts. Freshwater phreatic diagenesis is indicated by complete occlusion of primary porosity. Environment of deposition of the limestone was subtidal --> transitional --> supratidal (evaporites). Kinds of dolomitization fabrics are: "type 1" where only limestone groundmass is dolomitized; "type 2" where the groundmass and allochems are dolomitized; and "type 3" where dolomitization has obliterated all details of the precursor carbonate. Lockport dolomites formed in two stages by different mechanisms: 1) An early phase of syngenetic replacement of pre-existing carbonate resulted in finely crystalline dolomite. Syngenetic replacement occurred in an arid climate on a supratidal flat; however, typical sabkha diagenesis is absent. 2) A later phase of diagenetic replacement occurred in a phreatic zone of mixing between a) seawater and freshwater, and/or b) evaporative brines and seawater.--Modified journal abstract.