Diagenesis in the Podhale and Orava Paleogene flysch basins and in the underlying Mesozoic structural units was studied by XRD measurement of the percent smectite in the mixed-layer illite-smectite from shales and K-Ar dating of the illite-smectite from bentonites, supported by XRD quantitative mineral analysis, grain density, and porosity measurements of the bulk shales. The diagenetic mineral reactions identified in the flysch shales include illitization of smectite (>60 to <5%S), dissolution of K-feldspar and kaolinite, crystallization of quartz, albite and chlorite. An unusually large amount of basin history information was obtained by combining the illite-smectite data from wells and from the present erosional surface of the basin. The rocks underwent burial diagenesis at a stable geothermal gradient similar to the present-day value of 21±2°C/km. The maximum burial temperatures were reached very quickly (high sedimentation rate) close to the basin inversion time, at ∼17 Ma in the western part and 18 Ma in the eastern part. The basin floor, which included the present-day Tatra Mts., was inclined towards the East. The thickness of the sedimentary filling of the basin ranged from 3.5–;4.5 km in the western Tatra (removed entirely), to 5–;6 km in the western Podhale (<3–4 km removed), to 6.5–7.5 km in the eastern Podhale (>4–5 km removed), and even more in the eastern Tatra and Spišská Magura close to the Ružbachy Fault. These data imply a major subsidence followed by uplift of the Podhale plus Tatra block along the Ružbachy Fault and the deposition of a thick sequence of Lower Miocene sediments over the entire area (latter removed by erosion). The Mesozoic rocks of all the structural units underlying the flysch basin underwent advanced diagenesis (maximum palaeotemperatures of 160–270°C) during an Upper Cretaceous tectonic burial event at ∼80–90 Ma. The tectonic overload was removed before the Eocene transgression (49–42 Ma).