Postojna is a town in… Postojna is a town in the traditional region of Inner Carniola, 35 kilometers (22 mi) from Trieste, in southwestern Slovenia. It is the seat of the Municipality of Postojna. The area is known to have been populated since the paleolithic era due to the discovery of a cave settlement near the town of Postojna called Betal Rock Shelter (Betalov spodmol). The town lies on the Pivka River. Written sources first mention the settlement in the 13th century and in 1432 it became a borough. It was proclaimed a town in 1909. From the late Middle Ages, it was part of the Duchy of Carniola and hence of the Habsburg Monarchy. It was under Italian rule between 1918 and 1943 (nominally to 1947) and was part of the province of Trieste as Postumia. One of Slovenia’s major tourist attractions, Postojna Cave, is located near the town. Postojna Cave is a 24,120 m long karst cave system near Postojna, southwestern Slovenia. It is the second-longest cave system in the country (following the Migovec System) as well as one of its top tourism sites. The caves were created by the Pivka River. The cave was first described in the 17th century by the pioneer of study of karst phenomena, Johann Weikhard von Valvasor. In 1818, when the cave was being prepared for a visit by Francis I, the first Emperor of the Austria-Hungary, a new area of the cave was discovered accidentally by local Luka Čeč. In 1872, cave rails were laid along with first cave train for tourists. At first, these were pushed along by the guides themselves, later at the beginning of the 20th century a gas locomotive was introduced. After 1945, the gas locomotive was replaced by an electric one. About 5.3 kilometres (3.3 mi) of the cave system are open to the public.In June 2015 the cave administration reported that cave divers managed to explore a further underwater section of the cave leading towards Planina Cave, thus lengthening the cave system from 20,570 m (67,490 ft) to 24,120 m (79,130 ft).