Shallow-marine Permo-Triassic sandstone of the northern Perth Basin, Western Australia, shows a progressive range down-dip in pore-water salinities, and in the mineralogy of diagenetic assemblages. These features have been interpreted as resulting from a history involving three hydrocarbon injections, and the introduction of meteoric waters. The sandstone units, some containing oil and gas, dip and thicken southward toward the basin depocenter. Salinity in both irreducible water of the hydrocarbon column and pore water of the water leg increases southward. Isohalines in the hydrocarbon column are broadly parallel to those in the water leg, but water salinity in the oil column is higher than in the water leg. In the north, typical diagenetic mineral assemblages include kaolinite, siderite, pyrite, Ti-oxides, and quartz, but farther south they include chlorite, pyrite, albite, Ti-oxides, and quartz. Detrital feldspar and mica in the north are partly dissolved and altered to kaolinite, whereas to the south, they show chlorite alteration. The authigenic phosphate xenotime increases from north to south. The contrast in diagenetic assemblages from north to south, together with the increase southward in water salinity, point to southward flow of introduced water, and siderite zonation indicates that the introduced water ranged from meteoric to saline. The water probably originated on basement near the northern margin of the basin, which, although now exposed, may have been repeatedly submerged and exposed since the Permo-Triassic. It flowed down dip, generally diluting saline connate waters of the marine sequence as it penetrated the basin. Flow began during early diagenesis. There were at least two episodes of oil emplacement. The presence of the first oil halted most mineral diagenesis in the reservoir, and solid bitumen envelopes developed around radioactive monazite grains. As the oil leaked out, mineral diagenesis recommenced, and traces of residual oil were trapped in the growing quartz. Emplacement of the second (present) oil again halted mineral diagenesis, and a little of the new oil adhered to envelope surfaces or penetrated envelope cracks. A late gas inflow displaced the oil-water contacts. The fresh-water influx continued below the hydrocarbon column, lowering salinity in the water leg and promoting quartz cementation. The influx may still be going on.