Variations in the texture and sulphur isotopic composition of pyrite in the Upper Cretaceous Marshybank Formation are linked to depositional environment. Abundant, framboidal (and lesser euhedral) pyrite precipitated in offshore marine rocks. Moderate quantities of pyrite also crystallized in brackish, coastal plain rocks. However, in contrast to marine pyrite, coastal plain pyrite is dominantly euhedral in texture, reflecting direct precipitation from a porewater with a relatively low dissolved sulphide concentration. In the marine rocks, pyrite δ 34S values range from −35.7‰ to +27.4‰ (avg. −4.8‰ Canyon Diablo Troilite, CDT). Pyrite within carbonate concretions hosted in these marine rocks has a similar isotopic composition (−49.8‰ to +10.6‰ CDT). However, isotopic values are often highly variable within individual concretions as a result of the heterogeneous nature of sulphate reduction and pyrite formation within marine sediments. Pyrite in coastal plain rocks is characterized by relatively high δ 34S values (−4.2‰ to +35.5‰, avg. +13.2‰ CDT), while the overlying sideritized conglomerates have the lowest δ 34S values reported for Cretaceous rocks from the Western Interior Basin of North America (−49.8‰ to −41.7‰ CDT). Very low δ 34S values, which are only observed in the marine rocks, are indicative of microbial sulphate reduction and pyrite formation in a sulphate-replete (i.e., open) system. Higher δ 34S values (up to +18‰), which were obtained for both the marine and coastal plain rocks, are indicative of progressive pyrite crystallization in a sulphate-limited (i.e., closed) system. Such conditions are expected in marine sediments as burial occurs, and in brackish (i.e., low sulphate) sediments. Pyrite with very high δ 34S values (>+18‰) is common in the coastal plain rocks. These high values are the result of influx of 34S-enriched, residual sulphide derived from overlying marine units. A minor amount of 34S-enriched pyrite is also present within, and proximal to marine sedimentary Unit H, which was deposited at the same time as the coastal plain rocks. We hypothesize that porewater containing 34S-enriched, residual sulphide flowed from the coastal plain and along Unit H, into the marine sediments, thus producing anomalously high δ 34S pyrite.