Since the opening of the Suez Canal in 1869, the Cisleithanian government of Austria-Hungary had urged for a direct connection of the restored main Austrian seaport at Trieste with the Bohemian coalfields and iron works in the northern parts of the Monarchy. After lengthy discussions, the building of the Tauernbahn was set up as a part of the larger "New Alpine Railways" investment project, pushed by the newly established k.k. Railway Ministry under Heinrich von Wittek from 1901 onwards. Construction was executed by the publicImperial Royal Austrian State Railways to achieve an alternative route bypassing the Southern Railway line from Vienna to Trieste via the Semmering railway operated by the private Austrian Southern Railway company. Other sections built in the course of this infrastructure investment were the Karawanks Railway from Villach to Jesenice, continued by the Bohinj Railway leading through the Julian Alps to Trieste, as well as the railway line from the city ofLinz across the Pyhrn Pass to the Selzthal rail hub. Construction of the Tauern Tunnel began on 24 June 1901, the northern ramp from Schwarzach-St. Veit was built from 1902 onwards. Significant construction cost overruns triggered fierce debates in the Austrian Imperial Council, nevertheless on 20 September 1905 the first section of the line up to Bad Gastein station was ceremonially opened by Emperor Franz Joseph I, Minister-President Paul Gautsch von Frankenthurn, and Archbishop Cardinal Johannes Katschthaler. The southern ramp down to Spittal an der Drau was erected from 1906 under the supervision of the Viennese engineer and entrepreneur :de:Wilhelm Carl Gustav von Doderer|Wilhelm Carl Gustav von Doderer, father of the writer Heimito von Doderer. The railway line was completed in 1909 and inaugurated by the emperor at Spittal station on 5 July. The tunnel itself had been built double-track, the northern and southern sections only single-track. The Obervellach station near the southern tunnel exit, situated on a slope above the village, from 1931 could be reached by a cable car, that was dismantled in 1976. In 1999 the Obervellach station was finally abandoned and relocated to Mallnitz. In 1933-35 the Tauern Railway line was completely electrified. From 1969 onwards further sections were restored to double track including several new passages, viaducts and straightenings to cope with the high traffic load and to allow higher travelling speeds. The southern ramp down to Pusarnitz was completed double-track in 2009, while parts of the former track bed between Mallnitz and Obervellach were turned into a hiking trail. A new double-track bridge in the Gastein valley was put into operation in 2016.
Rail service
Since 1920 car shuttle trains through the Tauern Tunnel ply between the stations of Bad Gastein-Böckstein and Mallnitz. Up to World War II, the Tauern Railway mainly served Austrian domestic rail service, with a few links to Yugoslavia. After the war, the number of international train services to Southeast Europe increased as the main route via Bratislava and Budapest was blocked by the Iron Curtain. From 1951 to 1988 the Tauern-Express ran from Ostend to Yugoslavia, including through coaches to Athens and Istanbul, frequently used by migrant workers in West Germany. Long-distance services have decreased since the Yugoslav Wars in the 1990s, and by competition from expanded road connections and cheaper flights. Today the Tauern Railway provides EuroCity service to Zagreb and ÖBB InterCity connections link Salzburg with Klagenfurt, partially served by Railjet trains.