The history of rail transport in Poland dates back to the first half of the 19th century when railways were built under Prussian, Russian, and Austrian rule. "Divided Poland" in the 19th century was the territory of the former Polish–Lithuanian Commonwealth, and each ruling power administered transport in their sector. After the independence of the Second Polish Republic was declared on 11 November 1918, the Polish state administered its own railways until control was surrendered to German and Soviet occupiers during World War II.
During and after World War II major territorial changes were made again, with the Polish borders shifted westward in 1945, putting many German railways under Polish control and leaving several Polish ones in the East.
1835–1914
Prussian heritage lines
Upper Silesian Railway Company In 1842, the Upper Silesian Railway Company, licensed since 1839, opened the first two sections of its main line: Breslau () to Ohlau () on 22 May and Ohlau () to Brieg () in August. These are the oldest railway sections of present Poland. Step by step the Upper Silesian Railway (Oberschlesische Eisenbahn, OSE) line was extended, in 1846 connecting Katowice. In 1847 Mysłowice at the border of Austrian Galicia was reached and the connection to Kraków and Upper Silesian Railway complete.
In 1856 the Upper Silesian Railway Company built a line from Breslau (Wrocław) to Posen (), and took over the administration of Stargard–Poznań Railway, in order to control the traffic between Silesia and the Port of Stettin ().
Oberschlesische Schmalspurbahn (OSSB) In 1851 inside its standard gauge main line, the Upper Silesian Railway Company started to build a narrow gauge network, connecting local mining trams. This Oberschlesische Schmalspurbahn (OSSB) survived the nationalization of the standard gauge lines, and in two steps 1920 and 1945 became present day Górnośląskie Koleje Wąskotorowe (GKW). It was extended to its top length of 233.5 km in 1965. A small remnant is still busy, offering a tourist passenger service.
Lower Silesian-Mark Railway
In 1843, the Lower Silesian-Mark Railway (, NME) opened its first section from Breslau () to Königszelt (). In 1846 the line joining Breslau () to Berlin was completed.
William Railway 1846 to 1848 the William Railway (, ) was built in Prussian Upper Silesia to link the Upper Silesian Railway (, ) from Cosel (, now in Polish town Kędzierzyn-Koźle) to the Emperor Ferdinand Northern Railway (, ) in Austrian Silesia now Czech Silesia. The junction and terminus of both lines at the border was in Oderberg (, ). The junction provided the communication between Berlin and Vienna as well as between Warsaw or Kraków and Vienna.
Silesian Mountain Railway
The Silesian Mountain Railway from Görlitz via Lauban () and Hirschberg () to Waldenburg () was opened in 1867 and extended to Glatz () in 1880.
Stargard–Poznań Railway Poznań was connected with Berlin via Stettin (Szczecin) in 1848 by erecting Stargard–Poznań Railway.
Prussian Eastern Railway
At the same, the Prussian Eastern Railway was planned from Berlin to Königsberg (present day Kaliningrad), passing through stations like Küstrin (Kostrzyn nad Odrą), Schneidemühl (Piła), Bromberg (Bydgoszcz) with a branch to Danzig (Gdańsk). The station of Kreuz (Krzyż) at the crossing point of Stettin–Poznań and Berlin–Königsberg had primarily been laid out for the latter to line be the trunk. Most parts of this main line were opened in 1852, but the construction of the bridges across Oder river at Küstrin (Kostrzyn) and Vistula and Nogat rivers between Dirschau (Tczew) and Marienburg (Malbork) was not completed before 1857.
In 1867, two other lines were opened: from Stettin/Szczecin to Danzig/Gdańsk via Stargard Szczeciński, Belgard (Białogard), Köslin (Koszalin) and Lauenburg in Pommern (Lębork); Frankfurt to Poznań via Reppen (Rzepin) and Bentschen (Zbąszyń).
Prussian state railways
In 1875 the Gründerzeit economic boom led to an economic crisis caused by the panic of 1873 and speculation in railway shares in Germany and Austria. The Chancellor of Germany, Otto von Bismarck, supported the elimination of speculation on railway joint-stock companies. He also supported the state's compulsory purchase of railways from private owners, as well as the introduction of an exclusive goods rate for the transport of agricultural products from Pomerania and East Prussia to Berlin.
Prussia nationalized its railways in 1880 in an effort both to lower rates on freight service and to equalize those rates among shippers. However, instead of lowering rates as far as possible, the government ran the railways as a profit-making undertaking, and the railway profits became a major source of state revenue. The nationalization of the railways slowed the economic development of Prussia because the state favoured the relatively backward agricultural areas in its railway building. Moreover, the railway surpluses substituted for the development of an adequate tax system.Rainer Fremdling, "Freight Rates and State Budget: The Role of the National Prussian Railways 1880–1913," Journal of European Economic History, Spring 1980, Vol. 9#1 pp 21-40
In 1893, the Prussian state railways introduced the first modern fast trains (in German "D-Zug") using the new steam locomotive (S2/PKP class Pd1) which could reach a speed of . The trains also included 4-axle bogie coaches with compartments and side corridor and covered gangways (Corridor trains). One such fast train route was that from Berlin to Bromberg and Danzig. In 1898, the first locomotive using superheated steam in the world, designed by Wilhelm Schmidt, was produced by the Vulkan company in Stettin for Prussian state railways (KPEV Hannover 74 S4). This opened a new age of steam locomotive development. Construction of the prototypes of superheated steam locomotive classes by Robert Garbe started in 1902. These were: S4 (PKP class Pd2) for fast trains, P6 (PKP class Oi1) per passenger trains and G8 (PKP class Tp3) for goods trains.
In the same year the Malborsko–Mławska Railway (the last large private railway under Prussian rule) was nationalized.
1906 saw the continued production of famous standard superheated steam locomotive classes by Garbe in the Linke-Hofmann locomotive factory in Breslau for the Prussian state railways. 584 of S6/PKP class Pd5 were produced, of which 82 units were operated by Polish State Railways (PKP). Approximately 4000 of P8/PKP class Ok1 were produced, of which 257 were operated by PKP before World War II, and 429 after the war. One of these, Ok1-359, is currently preserved in working order at the Wolsztyn museum.
Öls–Adelnau–Ostrów line In 1910, the Öls–Adelnau–Ostrów line / Oleśnica–Odolanów–Ostrów Wielkopolski line that shortened the connection between Wrocław–Łódź and Warsaw was opened. Construction of the prototype of the long series 5-axle Prussian cargo locomotive G10 (PKP class Tw1) with exchange chamber with steam locomotive P8 (PKP class Ok1) by Garbe took place the same year. Three years later, production of cargo locomotive G8.1 of the Prussian state railways (PKP class Tp4) in the F. Schichau factory in Elbing commenced. Final production figures were 5267 items (459 items by PKP). That was the second longest locomotive series in Europe.The longest series of more than 7,000 items was DRB Class 52, a so called War Locomotive of World War II
Warsaw–Vienna line
In 1839, the Warsaw-Vienna Railway Company was founded as a joint stock company. In the same year it applied for a license to build the Warsaw–Vienna Railway line. Construction started in 1840, but in 1842 the company went bankrupt. The shares and property were taken over by the Government of Russian Poland in 1843 and construction continued. The first section (from Warsaw to Grodzisk Mazowiecki) was finished on 15 June 1845, and before December had reached Skierniewice. The whole line to Granica ("Border") station was completed in 1848, with a junction to Szczakowa station of Kraków and Upper Silesia Railway. In the same year, after the outbreak of the Spring of Nations, the first large international railway-military operation dispatched over 200,000 mounted Russian soldiers from Warsaw to Vienna and Budapest to help the Emperor of Austria put down the uprising. In 1859, the Government of Russia turned over the Warsaw–Vienna Railway to private owners. Opened in 1865/66, the new double track branch of Warsaw–Vienna Railway from Koluszki to Łódź Fabryczna was the most profitable railway in Congress Poland.
In 1894, the Warsaw–Vienna Railway ordered 13 fast steam locomotives with the Prussian S 2 design, and a series of modern 4-axle cars which covered transit routes from Schwartzkopff.
It was decided to nationalize the Warsaw and Vienna and Warsaw and Bydgoszcz Railways and the broad gauge track Kaliska Railway managed by this society. One year later, a decision was made to readjust the Warsaw and Vienna Railway to broad gauge track, but it was not realized.
In 1902, the Warsaw–Vienna Company built a wide gauge railway from Warsaw to Kalisz via Łowicz and Łódź (the Warsaw–Kalisz Railway), on a route different from the company's standard gauge line. At that time, Kalisz lay near the western border of Russian Empire. In 1906, it was joined to Nowe Skalmierzyce on the Prussian side of the border, providing a direct communication between Łódź and Lower Silesia.
Austrian heritage lines
Kraków and Upper Silesian Railway
In 1847, the Kraków and Upper Silesian Railway (Kolej Krakowsko-Górnośląska), connecting Kraków to Mysłowice in Prussian Upper Silesia was completed. Owned by the City of Kraków, it was the first railway in the Austrian ruled part of Poland. It was linked to the Upper Silesian railway (Wrocław/Breslau to Upper Silesia) in the same year and to the Warsaw–Vienna Railway in 1848.
Emperor Ferdinand Northern Railway Though in 1836 a licence had been issued to the Emperor Ferdinand Northern Railway to connect Vienna, Ostrava, Kraków and Bochnia, that railway was only built from Vienna to Bohumín on the Austrian and Prussian border, and the only rail communication form Vienna to Kraków used Prussian rails in upper Silesia until 1856.
Karol Ludvig Galician Railway After some reorganizations, the Karol Ludvig Galician Railway (after intermediate Eastern National Railway ÖStB descendant of the Kraków and Upper Silesian Railway), step by step extended eastward, connected Kraków to Lwów (Lemberg, Lviv) in 1861.
Russian heritage lines
The standard gauge Warsaw and Vienna Line had been the first long-distance railway under Russian rule at all.
Saint Petersburg–Warsaw Railway
Warsaw's first link to the system was the Saint Petersburg–Warsaw Railway, completed in 1862. One year before, a branch of the line had reached the Russian and Prussian border with Verzhbolovo Station in Kybartai. This first junction of Russian wide gauge and Prussian standard gauge networks passed the northeastern corner of Russian Poland, which did not become part of Poland again after Polish revival.
Warsaw and Bydgoszcz Railway Also in 1862, the last standard gauge main railway line in Russian Poland was opened between Łowicz (at a branch of the Warsaw and Vienna Line) to Aleksandrów Kujawski near the Prussian border. It was the Russian part of the Warsaw and Bydgoszcz Railway, the first direct connection between Warsaw and the Prussian ruled parts of old Poland.
Warsaw-Terespol Railway
In 1866, the direct railway form Moscow to Warsaw via Brest was finished.
Iwanogrodzko–Dąbrowska Railway