The Spielfeld–Trieste railway is a double-track, electrified main line in parts of Austria, Slovenia and Italy. It was built as a section of the Austrian Southern Railway (österreichische Südbahn Vienna–Trieste) by the state-owned k.k. Südliche Staatsbahn (Southern Railway) and from 1858 onward operated for decades by the Austrian Southern Railway Company (Südbahngesellschaft), a large private railway company in the Austrian Empire and Austria-Hungary. It runs from Spielfeld-Straß over the Austrian-Slovenian border at the Municipality of Šentilj, continuing via Maribor, Ljubljana and the Slovenian karst to the Adriatic port of Trieste, today in Italy. It continues from Spielfeld-Straß to Vienna as the Southern Railway nowadays.
 The first plans for a railway connection between Vienna and the Adriatic Sea emerged in 1829. Construction between Vienna and Baden bei Wien commenced in 1839, and between Vienna and Gloggnitz in 1842. Operations between Mürzzuschlag and Graz commenced in 1844. The Southern Railway began construction work from Graz south to Celje (then called by its German name of Cilli) in 1843. Extensive engineering structures were necessary for the construction of the line. This section was opened on 2 June 1848.
 Construction on the following section to Ljubljana (Laibach) was delayed by the Revolution of 1848, so that operations could not start until 18 August 1849. The gap between Gloggnitz and Mürzzuschlag was closed in 1854 with the opening of the Semmering railway (Semmeringbahn), making the Vienna–Ljubljana line continuously trafficable.
 The continuation of the line to Trieste caused difficulties. Both the Ljubljana Marsh and the Karst Plateau, which sloped steeply towards the Adriatic, had to be overcome. The section from Ljubljana to Postojna (Adelsberg) opened on 20 November 1856. The Ljubljana Marsh was crossed on a 2,400 m long and up to 15 m high embankment. The 584 m long, two-level Borovnica Viaduct was built near Borovnica.
 The last section to Trieste was opened on 27 July 1857. 14 viaducts were necessary to cross the karst at Aurisina. The line ended at the site of the current Trieste Centrale station.
 Initially, the route was operated by the Wien-Gloggnitzer Eisenbahn-Gesellschaft (Vienna-Gloggnitz Railway Company) on behalf of the k.k. Südlichen Staatsbahn (Southern Railway). The Southern Railway took over the management of the line on 1 May 1851. The k.k. südliche Staatsbahn was sold to the private k.k. privilegierte Südbahn-Gesellschaft (Austrian Southern Railway Company) on 23 May 1858.
 Historically, the route crossed the Austrian Crown lands of Styria, Carniola and the Austrian Littoral. The towns (with the exception of Trieste) were mostly populated by German speakers, while the countryside was almost 100% Slovenian. The area, which up until then had been off the main transport routes, experienced a considerable development boost thanks to the construction of the Southern Railway: people could now reach the booming Vienna region just as easily as Trieste, the main port of the Habsburg monarchy. The Southern Railway Company built its main workshop in Maribor (Marburg), which provided many jobs.
 An efficient trade route was created for the entire empire, over which traffic could be carried out as far as the Middle East. The railway was very beneficial to tourism: the Postojna Cave for example, which was on the line, was a well-known travel destination as early as the Biedermeier period. Travel to Zagreb was simplified. The creation of the "Austrian Riviera" in Istria would not have been possible without the Southern Railway. The Austro-Hungarian Navy, which launched its new ships in Trieste and converted Pula into its main naval port, maintained contact with the Ministry of War in Vienna via the Southern Railway.
 From 1869, Trieste complained about emerging competition from the ports of Rijeka (Fiume), Venice, Hamburg and Genoa, which over time led to a demand for the development of “supplementary railways” from the Empire to Trieste. The so-called "Trieste railway question" or the campaign for a second rail connection with Trieste was established in 1891 and taken up by the Österreichischer Gewerbeverein (Austrian Trade Association) and the Österreichischer Ingenieur- und Architekten-Verein (Austrian Association of Engineers and Architects) and various considerations were discussed. The main aim of the various proposals discussed was a shorter, faster rail connection; several of the proposed routes between Trieste and the Drava region, located on the northern side of the Karawanks, were found to be worthy of further consideration:
 In 1906, when the Villach–Rosenbach railway and the Bohinj Railway (Wocheinerbahn and Karstbahn) were opened, the Trieste railway question was considered resolved.
 Following changes to national borders at the end of the First World War in 1918, the Southern Railway was divided between three countries: Austria (border at  Šentilj), Yugoslavia and Italy. From 1920 (Treaty of Rapallo) to 1945 the Yugoslav–Italian border was at Planina, so Postojna was in Italy. This border was near Sežana between 1945 and 1991; this became the Slovenian–Italian border in 1991. The southernmost section from Sežana to Trieste was located in the Free Territory of Trieste from 1947 to 1954 and since then it has been part of Italy.
 The historic Southern Railway is one of the two main axes of rail traffic in Slovenia. It still serves as an international link between Slovenia and Austria and Italy. For Austria and the Czech Republic, the Southern Railway still provides access to the Adriatic Sea, through the ports of which goods are transported (in competition with Rotterdam and Hamburg on the North Sea). The European Union membership of all of these countries has made the movement of goods much easier, and participation in the Schengen Agreement has eliminated identity checks for passengers.
 The Maribor Tezno, Maribor, Pesnica and Šentilj stations and the Šentilj tunnel are to be modernised and a new Pekel tunnel is to be built north of Maribor by February 2023. It is planned that a second track will be built between Maribor and Šentilj by 2026.