The Pieniny Mountains consist mainly of geological deposits which were formed in the Jurassic and Cretaceous periods. In those times the area currently occupied by the Carpathians was submerged beneath the ocean surface. In the late Triassic, strong tectonic movements caused cracking and folding of the ocean bottom. The ocean was fragmented into a number of minor basins. One of them was the Pieniny basin. As a result of sedimentation and the varied structure of the basin floor, many different rock layers were created, dominated by limestone. Some limestone was formed by crinoids shell deposits – “crinoid limestone”; others were hard, weather-resistant “cherty limestone” built up of infusorians. Other rocky layers included slates, marls, radiolarites and sandstones.
At the end of Cretaceous period, in the Mesozoic, strong orogenic movements began. Rocks that had been lying at the bottom of the Pieniny basin became fissured, raised and then overlapped over each other in the form of large structural units of nappe character. This process caused the massif of pre-Pieniny to heave above the surface of the sea. The process occurred in a north-south direction. Consequently the width of the Pieniny basin decreased from 250-300 to approximately 50 km.
At the beginning of the Tertiary period, in the Paleocene, the situation reversed and previously raised limestone formations subsided, while the surrounding flysch ones were uplifted. The folded Pieniny Klippen Belt was once again flooded by the water in the Magura basin and became a submerged mountain ridge. As a result of sedimentation processes the ridge became covered with flysch deposits. The next orogeny occurred at the turn of the Oligocene and the Miocene (about 24 million years ago). The limestone formations of the Klippen Belt were once again raised and crushed among the blocks of the Inner and Outer Carpathians (Beskidy) (which were in the process of being uplifted). Hence the width of the Pieniny Klippen Belt became reduced and now varies from 0.2 to 20 km.
Consequential crustal fractures became susceptible to volcanic activities. Andesit magma spewed out from deeper parts of the earth’s crust through faults - which had been created earlier - and subsequently solidified under the surface. Slow upheaval accompanied by strong erosion (which had occurred in the Tertiary and Quaternary) exposed blocks partly composed of andesite. These blocks can nowadays be found at Jarmuta mountain in the Pieniny, Wdżar in Gorce and Bryjarka in Beskid Sądecki. In addition, volcanic processes created the mineral springs in Krościenko and Szczawnica.
In the Tertiary, rivers used to flow at levels equivalent to the highest presently occurring in Pieniny. The Pre-Dunajec river gently meandered above the height of present-day vegetation. Due to the slow upheaval movements which occurred in the Quaternary, the Dunajec river started to cut into limestone formations. Thus the formation of the Pieniny gorge had begun.