As one of the predominant diagenetic products in clastic rocks, calcite cements are typical fingerprints of cement‐forming fluids and are key controls on reservoir quality. The Puig‐reig anticline, in the south‐eastern Pyrenees (Spain), exposes excellent outcrops of conglomerates, sandstones and claystones, which were deposited from a proximal to medial fluvial system and underwent folding, fracturing and cementation. This anticline constitutes an appropriate case study to investigate the origin and distribution of calcite cements during folding evolution and how they affect reservoir quality. Based on structural, petrographic and geochemical analyses (carbon, oxygen, strontium and clumped isotopes and elemental composition), five generations of calcite cements (‘Cc0’ to ‘Cc4’) have been identified, filling intergranular porosity of host rocks, faults and four fracture sets (F1 to F4). Calcite cement Cc0 precipitated in intergranular porosity from meteoric fluids in the phreatic zone during the early diagenetic stage. During the most intense phase of thrusting and folding, Cc1 precipitated in intergranular porosity, faults and F1 to F4 fracture sets from hydrothermal fluids that migrated from deeper areas of the Pyrenean chain. During the late stage of fold growth, Cc2 precipitated in faults and their associated fractures in the anticline crest from hydrothermal fluids but at shallower burial depths than that of Cc1. Calcite cement Cc3 mainly precipitated in fractures with the same strike as F1 and F4 fracture sets in the north‐western part of the anticline, from formation fluids that probably migrated through the frontal thrust of the south‐eastern Pyrenees. During the continuous fold denudation, Cc4 precipitated from meteoric fluids in F1 to F4 fracture sets across the anticline. Results indicate that at foreland basin margins, external fluids coeval with compressional deformation and/or alteration of detrital carbonates contribute to intensive calcite cementation. This can result in an overall occlusion of porosity and significantly damaged reservoir quality.