The diagenetic evolution of Permian (Autunian and Saxonian) and Triassic (Buntsandstein) sandstones and mudrocks have been studied over 1000 m sequence from the Sigüenza 44‐3 drill core in the Iberian Range, Spain. We compare and contrast the diagenetic processes in these different lithologies and the timing of clay mineral formation. Moreover, we establish the relationship between clay mineral diagenesis and reservoir potential. Both the Permian and Triassic successions are characterised by conglomerates, sandstones and interbedded mudstones of fluvial origin that change upwards into distal deposits of a fluvio‐deltaic system. The clay minerals are illite, illite‐smectite mixed layers, kaolinite and dickite. The illite content in all sequences is not related to diminished feldspars; it is owing to the initial detrital mineralogical composition of the Autunian sandstones. The effect of feldspar alteration to kaolin minerals has a strong influence on the lost of porosity‐permeability in the Saxonian facies. In contrast, illite and mixed layers illite‐smectite are the main clay rims preserving porosity in the Buntsandstein sandstones. However, fibrous illite is the dominant pore‐filling in the Permian Autunian facies, closing porosity and permeability. Kaolinite and dickite show opposite trends: dickite increases yet kaolinite decreases from Triassic to Permian sandstones. Dickite replaced kaolinite during burial‐thermal evolution of the succession. The δD and δ18O isotopic signatures from silt and clay fractions indicate a mixture of meteoric and marine waters, and suggest a minimum temperature range between 60 and 150 °C for diagenetic pore fluids. The Permian δD values (−24‰ to −44‰) are relatively similar to Buntsandstein values (−24‰ to −37‰). However, the Permian δ18O values (+7.6 and +15.3, average of +13.3‰) are generally higher by ca. 6.2‰ compared to the Buntsandstein data (4.8–10.1‰, average +7.1‰). Such a variation is interpreted as the result of mesodiagenetic pore fluid changes. The extensive dickitisation of kaolinite is attributed to increased hydrogen ions resulting from maturation of organic matter. The vitrinite reflectance of organic matter and the modelled thermal history suggest a maximum burial of 3400 m, accomplished 70 Ma ago. The Permo‐Triassic reached the gas window shortly before major uplift, at 65 Ma, when further maturation and hydrocarbon expulsion ceased.