Authigenic ankerite in the gas-bearing mid-Permian Aldebaran Sandstone (Denison Trough, Queensland, Australia) has an anomalously light oxygen-isotopic composition (delta-O-18(SMOW) range: + 7.6 to + 14.4 parts per thousand) and exhibits a trend of O-18-enrichment from the base to the top of the unit. Textural relationships, together with burial and thermal modelling, indicate that this carbonate precipitated at temperatures of about 100 to 140-degrees-C, when the sequence approached maximum burial during the Late Triassic. This implies that ankerite precipitated from porewater very depleted in O-18 with respect to marine water (delta-O-18(SMOW) = -9 to 5 parts per thousand). The formation of this deep, relatively high-temperature ankerite is difficult to reconcile with downward percolation of meteoric water at that time since the basin was then undergoing its first burial/compactional cycle. We interpret the ankerite to have precipitated from porewater expelled upward from the earliest Permian Reids Dome beds. This thick unit, consisting mainly of high-latitude continental sandstones, mudrocks and coals, was initially saturated with very O-18-depleted meteoric water (delta-O-18(SMOW) almost-equal-to- 17 parts per thousand) partly derived from melted snow and ice, and is likely to have undergone overpressuring during rapid burial (at rates up to 1 km/Ma). Tectonically induced expulsion of "connate meteoric" porewater out of the Reids Dome beds took place as the sequence approached maximum burial prior to Late Triassic basin uplift. This water was flushed upward through the overlying units, retaining a (modified) meteoric isotopic signature, which was recorded by the precipitating ankerite. Computer modelling of heat transport, isotopic mass balance and water mixing quantitatively shows that this interpretation is viable. lending support to the suggested mechanism of upward, cross-formational porewater flow deep in a sedimentary basin.