The geological foundation of the territory of the Pieniny national park is composed of two basic structures. The western part of the Pieniny mountain range consists of a complex chain of rugged mountains through which the Dunajec river cut out a rocky canyon. Near to the spot where the Dunajec river leaves Slovakia, the Lesnicky Potok brook flows into the gorge from the right side. The Prielom Lesnickeho potoka chasm carved its path through the hard limestone cliffs. It is a gorge, nearly 300m deep squeezed between vertical dark gray limestone cliffs. Above the gorge, the valley of the Lesnicky potok brook is wider and oval-shaped.