Slovenia is a small country nestled in the middle of Eastern Europe, accessible by train from Austria, Hungary, Italy, and Croatia. The country is at the crossroads of Europe and has then started to develop its railways a long time ago to become more attractive. The regional network is also present in every region, especially in the western part of Slovenia.
The activation of the oldest railway in Slovenia dated back to 1846 and was built to connect the Austrian town of Graz and Celje. The network rapidly grew in the following years, mostly to link its neighbors among each other. Nowadays, Slovenia counts more than 1200 kilometers of railways that connect many attractions.
Let’s peer back in time to discover the story of Slovenia’s first railway, but also the development of the lines during the different times and political regimes.
Birth of the Slovene Railway
Ljubljana was not the first Slovenian city to reception a train, as the terrain around the future capital was offering quite a challenge. The first section of the railway was then erected under the rule of the Habsburg dynasty in Celje by the Austrian Southern Railway. The opening day, June 2nd, 1846, was the occasion of many celebrating events in Celje. The line was open regularly started in September for the passengers of both Celje and Maribor.
The route of the train line’s choice had significant importance in the development of the cities crossed or not crossed by the train. Indeed, this Southern line was at first designed to stop by the important city of Ptuj, but the small town of Maribor finally replaced it in the delineation of the railway. This choice explains why Maribor is now the second city of the country, and why Ptuj has started to stagnate ever since this period.
In 1849, the line was finally extended to Ljubljana and eventually to the port of Trieste, the former capital of Slovenia that is now Italian, in 1857 via the town of Sežana in the Karst region. The company that operated the trains at this time was called Südliche Staatsbahn.

For the first attempt, the train journey from Celje to Ljubljana was taken four hours and a half because of frequent stops and necessary check-ups. Soon, the time was shortened to three hours.
During the following decades, two major lines were integrated into the prominent national railway network. First, the line connecting the cities of Pragersko and Ormoz opened in 1860, followed by the line going from Zidani Most to Dobova two years later.
The expansion continued at the beginning of the twentieth century with the creation of a more direct route to Trieste, which was called the Transalpina. The Slovenian section was located in the western part of the country, next to the current Austrian border. It linked the cities of Jesenice and Trieste, passing by Villach, Kreplijie, and Villa Opicina.
Today, this railway still exists and actually marks the border between Italia and Slovenia. Indeed, this is incredibly easy to notice in the Slovenian town of Nova Gorica: the border is materialized just in front of the train station.
At the same period, another line was designed to link the eastern part of the country, with the city of Murska Sobota, and Hungary. However, it became difficult to exploit this railway network since the companies were multiplying and creating instability until World War II. The Südbahn company was rivaled by the short-lived JDZ and SHS companies, but mostly by MÁV-FS.
Nevertheless, the Slovenian regions of Karst and of the Adriatic coast, on the southern part of the country, were connected to the network by the lines going from Trieste to Postojna and from Rijeka to Pivka since 1936.
Developing During Communist Yugoslavia
After the end of WWII, Yugoslavia (that Slovenia was part of since 1918) became communist under the influence of Tito. The rail network was then administrated by one and only national company Jugoslovenske Železnice, also called JŽ. Some significant changes were made in the exploitation of the railway.
For instance, the route of the Transalpina was modified in order to remain in Tito’s ruling territory, connection Sezana from Kreplje. Elsewhere, new connections to the Adriatic were put in place after the loss of the port of Trieste to Italy. Koper was then linked to the railway network since 1967 when its port became accessible from Presnica through a mountainside route.
Creation of the Slovenske Železnice

When Slovenia became independent in 1991, the state created a new company, the Slovenske Železnice, or SŽ. It was charged with reestablishing some connections with the neighboring countries such as Croatia and Hungary during the 1990s. The company also continued using locomotives and trains from the former company, JŽ.
The current network counts 1208 kilometers of rails, 331 of which are double-track. Six hundred twelve kilometers of the railway network are covered with 3 kV DC electrification. The central point of the system is the railway station in the capital, Ljubljana.
Specificities of the Bohinj Railway
The most exciting parts of the Slovenian railway network are the connections to the Adriatic Coast and the Julian Alps, very useful for both tourists and locals. The line that will offer you the most memorable experiences is the Bohinj Railway: it actually crosses 28 tunnels, five galleries, and more than 65 bridges.
The Bohinj Railway is now part of the Path of Peace that celebrates the World War I Heritage from the Alps to the Adriatic. Then, it applied to figure in the UNESCO World Heritage List.
The most ancient tunnel of the line was created in 1904. Called the Bohinj tunnel, it was designed for the needs of the railway connecting Prague and Trieste. It was the longest tunnel in a Slovenian Railway (and still is today) with its 6327 meters, located on the shortest line linking the Adriatic Sea and Central Europe.
However, the most impressive feature of this great railway is the Solkan Bridge. Located across the Soča River, next to the town of Solkan, this railway bridge is the largest stone one ever built in the world. The central arch dates back to 1906 and is made of 4533 limestone blocks. It was renovated in 1927, as the fightings of World War I damaged it.
The Railway Museum in Ljubljana

If you are stopping by the capital of Slovenia, do not miss what most tourists and inhabitants call the best museum in the city. The Railway Museum is located at Parmova 35 in an old locomotive depot. It started to emerge in the 1960s before developing into a comprehensive and surprising museum.
The central building is located inside the rotunda’s locomotive garage: it showcases an impressive collection of steam engines and various other vehicles. You can also see a permanent exhibition on the topic of sciences that are involved in the operation of the railway.
The first room is designed to make you experience life in a stationmaster’s office at the end of the Austria-Hungary rule. The small building shows you the essential equipment necessary for traffic management and ticket sales. In the second room, you will find nine types of railway tracks that represent different periods and railway administrations: it will then teach you the story of Slovenia and its many rulers.
If you want to learn more about this old railway, do not hesitate to book a guided tour and discover all of its wonders!
You will have the chance to discover that the line supervisors and maintainers once used small railway vehicles with trolleys standing on them. Manual tools and aids bear are proofs of the difficult maintenance. You can retrace the development of the railway network in Slovenia through seven maps from different periods, alongside which old railway boundary stones remind us of the past.
Other parts of the museum feature devices for transmitting messages, such as telegraphs, teleprinters, and telephones, among others. This discovery will please your children, as well as the room dedicated to the railway uniforms and railway workers’ pieces of equipment, like manual lanterns.
You can also visit the museum’s small art gallery dedicated to the railway: it features many beautiful artworks that will surprise and amaze the visitors.
- Adults: 8 €
- Children, school children, students, elderly people: 4 €
- Adults (a group of min. 10 persons): 4 €
- Children, school children, students, elderly people (a group of min. 10 persons): 3 €
- Family ticket (2 adults + 2 children): 20 €
- Pre-school children, disabled, unemployed, and museum card (SMD, ICOM) holders: Free entrance
To conclude, there is much to learn about the ancient Slovenian railway while visiting Slovenia. The best part is that you can choose to go see the railway’s attraction by yourself in the whole country, even around the north of Ljubljana, or find out more about the old vehicles and traditions in the museum. It will allow you to dive back into history and learn more about the diverse regimes, occupations, and influences that marked Slovenia.