Container train from Koper to Budapest.

Scenic Railway: Shore to Mountain Along Koper-Divača

Over the past years, I visited the famous line between Koper and Divača a few times. The line will soon be replaced by a new-built line in tunnel. Opening of the new line is currently scheduled in April 2026. Therefore I thought it interesting to show the photos I’ve made during those few visits. I hope to inspire people to make the trip to this nice piece of scenic railway.
The pictures on this page are ordered from Koper to Divača, by the location of the train.
Locations where the photos were taken are also pointed out on a Google map:

Dekani
Start of the slope from Koper to Divača. This is an early morning point for trains leaving the port of Koper.

SZ 363 031 with a coal train from Koper to Linz. Dekani, July 12, 2024.

Kortine
The lower section of the line follows the valley of the Rižana river. Near Kortine the rail line crosses the river via a rather modern bridge.

SZ 541 104 pushing a Voest Alpine train with final destination Linz. Kortine, April 29, 2022.

Bezovica
A location near the town of Bezovica, with the town of Podpeč in the background, this is a spot for Koper-bound trains in the afternoon.

SZ 541 018 with a train bound for Koper. Besovica, April 30, 2022.

Hrastovlje
Next location on the line is Hrastovlje. There are many possibilities here, and I have certainly not visited all of them. Coming from Bezovica, the line runs through forests. I’ve only been able to make 1 photo there so far, shor from a distance.

SZ 541 014 with a Divaca-bound container train between Bezovica and Hrastovlje, shot standing somewhere near Zanigrad. October 25, 2019.

After passing the forest, the lines runs with a turn over an embankment before entering Hrastovlje station and the tunnel that’s part of the 180° loop.

Container train from Koper to Budapest
Metrans 383 430, running for SZ, is pushing train 42000 with final destination Soroksári út Rendező, near Budapest. Hrastovlje, July 12, 2024.
Night train from Koper to Maribor and Budapest
Night train RG1604 to Maribor and Budapest-Deli has left Koper a few minutes ago. Hrastovlje, July 12, 2024.
SZ 363 locomotive with container train.
SZ 363 025 with train 43622 to Dunajska Streda. Hrastovlje, July 12, 2024.

Right on the other (uphill side) of the tunnel, you have a view on the whole upper part of the line, from Hrastovlje until Črnotiče. Many possibilities if you’re not afraid to use a tele lens. A pole can be used for the photos with a wider angle. However, you’ll have to look for an open spot in the forest if you want to use a tele lens.

Container train from Austria to Koper.
SZ 541 108 with a train from Austria to Koper. Hrastovlje, October 24, 2019.
Container train from Linz to Koper.
SZ 541 104 with a container train from Linz to Koper. Hrastovlje, October 24, 2019.

This is the view from the bridge seen in the middle of above photo.

Container train to the port of Koper.
SZ 363 023 with container train 42003 to Koper. Hrastovlje, April 29, 2022.

Another view from on above the tunnel in Hrastovlje. The train is driving just west of the little bridge from above photo.

Container train from port of Koper.
SZ 541 005 pushing container train 43634 from Koper to Divaca and beyond. Hrastovlje, October 24, 2019.

From the turn in the middle of above photo you have this view. It’s perfect when the night train to Koper runs late. Beware: this is a seasonal train. In 2025 it runs until September 28. The town in the background is Hrastovlje.

Night train from Budapest to Koper.
SZ 363 004 with RG1605, a few kilometers before its final destination Koper. The last few coaches are Hungarian that made the Budapest-Deli to Maribor trip in train 1246 (“Istria”), and were then added to the RG1605 Maribor – Koper. Hrastovlje, July 12, 2024.

If you don’t mind the tele lens, this spot lets you photograph trains on the embankment down the line, and also trains running around the corner in the direction of Divaca. This view gives a good impression of how the line runs: on the slope of the mountains, right next to the valley.

Containertrain from the port of Koper to Budapest.
Metrans 383 424, running for SZ, is pushing train 42024 with final destination Soroksári út Rendező, near Budapest. Hrastovlje, July 12, 2024.

From within the town of Hrastovlje you can see the next stretch of line. To the left: Zanigrad. IN the foreground the nice little church of Cerkev sv Trojice.

Freight train from Koper to Leoben.
An unknown Taurus loco leads a train to Leoben. Hrastovlje, October 24, 2019.

One of the most well-known photo locations in Zanigrad is the one on the outside of the curve. It’s also one of the iconic views of the line. To access you follow a small road next to the tracks from where you can still watch the trains.

Freight train to port of Koper in Zanigrad.
SZ 363 026 with a container train to Koper. Zanigrad, April 29, 2022.

After some walking and searching for a spot between the bushes you’ll then be able to find the spot.

Freight train from Koper to Bratislava.
SZ 541 109 pushing a container train headed for Bratislava. Zanigrad, April 29, 2022.

And with the telelens you can capture a good view of trains coming out of the tunnel.

Freight train from Koper to Bratislava.
SZ 541 109 pushing a container train headed for Bratislava. Zanigrad, April 29, 2022.

On the other side of the tunnel you can see in Zanigrad, you’re already near the small town of Podpeč.

Freight train from Linz to Koper.
ELL 193 269 running for PPD Transport is seen with a train from Linz to Koper. Podpeč, October 25, 2019.

Podpeč is built between the rail line and the massive cliffs. There’s also a big iron railway bridge, but I’m unsure what it actually crosses.

Freight train from Koper to Slovakia.
SZ 541 008 with a container train from Koper to the Slovak Republic. Podpeč, April 30, 2022.

A bit more west is another one of those stone embankments. The rough terrain makes them necessary here. Good thing is they’re never covered by bushes.

Container train from port of Koper.
SZ 541 015 pushing a container train towards Divaca. Podpeč, April 30, 2022.

Between Podpeč and Črnotiče the line runs against the cliffs and through a dense forest. I did find this location in Loka to be quite interesting though, because it gives you a nice view over the valley. In the background we see Triëste, and the bridge of the highway A1.

Locomotives headed for Koper.
Some locos headed for Koper. Loka, April 30, 2022.

Then comes Črnotiče, arguably the most famous town on the Koper – Divača railway. The town is located on a kin of plateau. South of the town the rail line runs against high cliffs that face south-west. This offers many possibilities for shooting trains if you’re not afraid of using a telephoto lens. The short hike to the cliffs is pleasant and you will most likely meet other people enjoying the scenic path.
First location I want to show is one that should also be possible with good sun position during a long summer evening. I like this one too, though. The train is situated around Loka.

Container train from port of Koper.
A container train headed towards Divača. Loka, April 30, 2022.

The view in the other direction offers many possibilities. In the curves…

… and with some heavier telephoto lens work you get a view on the famous embankment, famous from the most well-known view of the line. But that’s for later, first some views from the other side.

And from the side.

Container train out of Koper.
ÖBB 1293 009 pushing train out of Koper. Črnotiče, April 29, 2022.

And then the cream of the crop, het neusje van de zalm, la crême de la crême. Well anyway, the most famous spot of the line. It’s very pleasant to sit, wait and watch here. Best enjoyed with friends and a drink.

Container train from Koper to Budapest.
SZ 363 005 with container train 42004 to Soroksari ut Rendezo. Črnotiče, July 12, 2024.

East of Črnotiče there are also many possibilities. For the first spot you have to find yourself a way in between the hedges. Challenging, but in my opinion worth the effort. Telephoto lens necessary.

Container train to Koper.
SZ 541 022 heading a container train to Koper. Črnotiče, April 30, 2022.

And another one of those famous locations. Beautiful, I have to admit. Beware of the bee hives when walking here!

Car train from Koper to Villach.
SZ 363 006 with a car train from Koper to Villach. Črnotiče, April 29, 2022.

East of the station, on the other side of the main road, the line runs through some plains set in front of a mountain range. It’s comfortabel waiting here, both during he day as in the evening.

Container train to Koper.
SZ 363 025 with containers towards Koper. Črnotiče, July 12, 2024.
Container train to the port of Koper.
SZ 541 103 with a container train to the port of Koper. Črnotiče, October 25, 2019.

The most spectacular part of the line runs between Koper and Črnotiče. It’s probably the reason why I don’t have many photos between Črnotiče and Divača. This one in Rodik is worth showing though.

Container train from the port of Koper.
SZ 363 009 with a container train headed for Divača. Rodik, April 30, 2022.

And finally we’re in Divača. I’ve only made photos here at night, because of the hotel being nearby. First a photo of a train to Koper.

Night photo of container train to port of Koper.
SZ 363 019 with a container train waiting to depart to Koper. Divača, April 30, 2022.

In Divača the lines to Koper and Trieste split. Traffic to and from the port of Trieste is less intense though. Here we see a train that has just arrived from Trieste and is waiting for clearance to continue its journey.

Freight train from Trieste to Gyor.
SZ 451 003 with a train from Trieste to Gyor. Divača, April 30, 2022.