Abstract The Middle Triassic shallow marine carbonates of the SE Pannonian Basin (Szeged Dolomite Formation) show evidence for multistage dolomitization and a complex diagenetic history. In first stage the whole sequence was completely dolomitized by reflux of slightly evaporated seawater. This process took place from the near surface till shallow burial realms and resulted in the formation of both fabric-preserving and fabric-destructive dolomite types. In the following stage nonplanar matrix dolomite and saddle dolomite cement were formed in the intermediate and/or deep burial realm. These later dolomite phases are likely generated by invasion of exotic fluids at relatively high temperature evidenced from the fluid inclusion homogenization temperatures, and stable isotope compositions. Vuggy, fracture, and solution enhanced porosity are also related to this local hydrothermal event. Microthermometry performed on saddle dolomite-hosted primary fluid inclusions confirm the presence of hot (138–235 °C) and moderately saline brines (4.1–8.7 mass% NaCl equivalent). The calculated δ18Owater and the measured δDwater values of the fluid inclusions from the saddle dolomite cement together with the relatively low salinity values indicate a metamorphogenic (and/or magmatic) origin of the hydrothermal fluid that probably was channeled along the Upper Cretaceous subhorizontal overthrust zones. The pores formed by the leaching effect of these hydrothermal fluids were subsequently partly occluded by meteoric calcite during the Paleogene–Middle Miocene subaerial exposure but a remarkable part was preserved, and currently serves as reservoir space. Such an integrated study of the different dolomite and porosity types, the understanding of their genesis, and timing relative to hydrocarbon maturation and migration could aid in exploration and development.