Ljubljana–Trieste by train

Cross-border route · Europe

Ljubljana–Trieste by train

From Ljubljana to Trieste via the Karst railway, with stops at Postojna, Divača and Sežana and arrival at the Adriatic coast.

  • Slovenia
  • Italy

5 cities 2 countries

In the photo: Train on the Jelenov viaduct, near Borovnica.

Illustrative images. The pictures in this guide are illustrations based on the real place, not photographs, and may differ from it.

The route

What the Ljubljana–Trieste by train is

The railway leaves Ljubljana across the Ljubljansko barje plain and skirts the slopes between Borovnica and Logatec. After Rakek it reaches Postojna, where you can get off to visit the cave and continue by road to Predjama. The line passes through Pivka before entering the Karst plateau. In Divača a waymarked trail links the station to the Škocjan Caves visitor centre in Matavun.

From Divača the train crosses the plateau to Sežana, the starting point for the Lipica Stud Farm. The international regional service crosses the border after Sežana and normally requires a train change at Villa Opicina on the Italian side. From there the railway descends toward the gulf to Trieste Centrale. From the station you can walk to the waterfront.

Share: WhatsApp

The map

5 cities in 2 countries

Slovenia and Italy Reference map: the line links the cities on the route in a straight line and does not show the actual rail or road path.
LjubljanaPostojnaTrieste

Outlines: Natural Earth, public domain. Adapted by Cidade Turismo.

The journey

City by city

Distances and times are approximate: check before you set off.

  1. Ljubljana
    1 · Slovenia

    Ljubljana

    Start at Ljubljana station. Check the platform number, as some departures are away from the main station building. If there is a replacement bus, confirm the pickup point at the bus terminal before leaving for the station.

    → Postojna about 67 km about 1 h to 1 h 20 min Line 50 leaves the Ljubljana plain, passes Borovnica and climbs in curves along the slopes of Verd to Logatec. It continues via Rakek to Postojna. On services with replacement buses, the change to rail may occur at Logatec.

  2. Postojna
    2 · Slovenia

    Postojna

    From the station, follow the signs to the entrance of the Postojna Cave Park. Book the tour and check the road connection to Predjama. The park bus runs at specific times and there are parking areas next to the cave and the castle.

    → Divača about 37 km about 35 to 40 min The train runs via Prestranek and Pivka before entering the limestone terrain of the Karst. The Ilirska Bistrica branch splits off at Pivka. For Divača, choose a service that continues toward Sežana.

  3. Divača
    3 · Slovenia

    Divača

    Get off at Divača to visit the Škocjan Caves. The station map shows the marked trail of about 4 km to the visitor centre in Matavun. The park estimates 50 minutes on foot each way. Book the tour and allow time to return. There is parking at the visitor centre.

    → Sežana about 10 km about 20 min on international regional services Between Divača and Sežana the tracks cross the Karst plateau around Povir. Some local trains stop there. On international regional services, check the next boarding point before getting off to go to Lipica.

  4. Sežana
    4 · Slovenia

    Sežana

    Use Sežana as your base for Lipica. Arrange a taxi or check the return transport before boarding. The stud farm has its own parking and concentrates guided visits on weekends from November to March.

    → Trieste The Slovenian regional crosses the border to Villa Opicina. There the Trenitalia regional continues on the Italian side, descends from the Carso and reaches Trieste Centrale. When replacement transport is in place, the final part may be by road, with the arrival point next to the station.

  5. Trieste
    5 · Italy

    Trieste

    Disembark at Trieste Centrale and walk along the seafront to Piazza Unità d’Italia and Molo Audace. Leave the climb to San Giusto for a time when there is no celebration at the cathedral. For Miramare, check the park’s closing schedule, which varies through the year.

How to travel

The way and the tickets

Search Ljubljana–Trieste Centrale on Slovenske železnice and check the onward connection at Villa Opicina on Trenitalia. See if the date includes a replacement bus and where it departs. To break the journey, check Postojna, Divača and Sežana as separate destinations and confirm whether your ticket allows travel interruption.

Best time to go

When to go: month by month

From April to June and in September and October, combine hikes on the Karst with strolls along the waterfront. In July and August, book cave visits in advance. From November to March, check the availability of tours in Škocjan and activities at the Lipica Stud Farm.

The seasons shown are the most usual ones; nature doesn't always follow the calendar.

Planning

Planning the trip

How many days

1 day for the crossing. Allow 3 to 4 days to visit two caves, stop in Sežana and explore central Trieste.

Who it's for

For travellers who enjoy train journeys, visiting caves and finishing in a port city. The walk to the Škocjan Caves adds about 4 km each way.

Traveler, share your experiences through photos Up to 5 photos of each place you visited.

Your questions

Frequently asked questions about Ljubljana–Trieste by train

Is the train from Ljubljana to Trieste direct?

The international regional services listed for the route typically require a train change at Villa Opicina. During engineering work also check alternatives involving replacement buses.

Which trains call at Postojna, Divača and Sežana?

In the direction of Trieste, Slovenske železnice regional connections 1824 and 1896 serve the three stations. Service 1896 may include a bus to Logatec. Check the schedule for your travel date.

At which station should I get off for the Škocjan Caves?

Get off at Divača and follow the marked trail to the Matavun visitor centre. It’s around 4 km and about 50 minutes on foot each way.

Can I get off at Postojna and catch another train the same day?

Search the onward journey as a separate trip and check the ticket conditions. Allow time to return from the cave or Predjama before boarding.

How can I tell if there is a replacement bus instead of the train?

Check the itinerary for the date and the notices from Slovenske železnice and Trenitalia. On some departures the change occurs at Logatec or Sežana. The bus pickup point may be outside the station.

Do I need to carry documents for the crossing to Trieste?

Yes. Carry the travel document accepted for your nationality and the conditions of your trip. Temporary border controls can occur. Requirements may change: confirm before travelling.

See all the routes in Slovenia

Beyond the guide