In 1901 the Austro-Hungarian government completed a line from Gabela in Herzegovina to Zelenika on the Bay of Kotor. It was constructed to 760mm gauge, as were most other railways in the region at that time. The Bay of Kotor region, together with the last few kilometres of the railway, was the subject of territorial dispute for much of the first half of the 20th century, but in 1945 it was confirmed as part of the Republic of Montenegro in the then Federation of Yugoslavia. The railway thus became the oldest in Montenegro. It closed in 1969.
The first railway to be built in Montenegro itself opened in 1908 between Bar and Virpazar, a distance of around 20km, and formed the first section of a line to Beograd in Serbia. It was also built to 760mm gauge. Further lines were built to the same gauge, resulting in a network which served most of the major towns of the sparsely populated country. In the 1960s and 1970s, the major routes were reconstructed to standard gauge and the narrow gauge lines closed.
A standard gauge line from the capital Podgorica to Hani i Hotit in Albania, linking with the Albanian network, was opened in 1986. The present day railway network of Montenegro thus has international links with Serbia and (for freight only) with Albania.
Flag image from CIA World Factbook