Both occupying forces introduced their own order. The Germans divided the conquered territory. In the area of the General Government (95 thousand sq. km), on 19 November 1939 the General Directorate of Eastern Railways (Ostbahn) (GEDOB) was established in Kraków. District directorates were set up in Kraków, Warsaw, Radom and Lublin. The general organisation of divisions in the new general directorate was not changed compared to the organisation before the war. German identification symbols were applied on the rolling stock. At the beginning of 1940 the German railway police, called the Bahnschutz, was established as another element of the system of repression. Poles could travel by all trains except fast trains. Also, they could not sit in carriages for Germans. On the other hand, Jews were not allowed to travel without pass cards.
The Soviets, who occupied half of the territory of Poland and seized 4,280 miles (6,887 km) of normal-gauge lines and 432 miles (695 km) of narrow-gauge lines, started converting traction into broad-gauge – 1,524 mm and adapting the acquired rolling stock to the new gauge. When the war between Soviets and Germans broke out in 1941, the territory of the Second Polish Republic previously occupied by the Soviets was incorporated into the General Government as a district of Galicia, including the former voivodeships of Stanyslaviv, Lviv, Ternopil and Volhynia. The area of the General Government increased up to 145 thousand square km. The new situation also entailed organisational changes and the assignment of respective lines and technical facilities to various centres of management.
After the incorporation of three voivodeships: Pomerania, Silesia and Poznań, and part of the Białystok voivodeship (92 thousand sq. km in total) into the Reich, two new districts: Reichsgau Wartheland and Danzig-West Prussia were formed in the annexed territory. Railways in Silesia, Greater Poland and Pomerania were incorporated into Deutsche Reichsbahn. The directorate in Katowice was dissolved and control was taken over by the Reich Railway Directorate in Opole. In addition, directorates were in operation in Poznań, Gdańsk and Königsberg.
In the territories incorporated into the Reich Poles could use the train service only if they were issued special pass cards. Polish railwaymen, and in particular members of the Silesian uprising, plebiscite activists, members of the Greater Poland uprising, and activists involved in social activity before the war were subject to repressions including executions by firing squads and imprisonment in concentration camps. Managerial and other functions were handled by the Germans.
Railway transport was a very important element of the German war machine, therefore, when the fighting ceased in September 1939, the occupying power commenced the reconstruction of the destroyed railway network.
Railwaymen were called to work. Work on railways offered protection against being taken away to Germany and forced to work and railway passes enabled travelling after curfew. The taken over factories resumed production of rolling stock: in the factory in Chrzanów, incorporated as an agency into Henschel und Sohn of Kassel, series of Pt31 steam locomotives (German BR39; 12 vehicles) were finished and the production of German BR44 steam locomotives (Ty4; 140 vehicles), OS (TKp “Śląsk”; 25 vehicles), narrow-gauge “Riesa” (57 vehicles) and several dozen locomotives of other series were launched.
In addition, mass production of simplified versions of DR war steam locomotives, so-called. “Kriegslok” BR52 (Ty2) was undertaken. They were produced in Chrzanów (349 vehicles) and in Poznań (369 vehicles) at the Cegielski Factory renamed as Deutsche Waffen und Munitionsfabrik (DWM). Boilers for those locomotives were supplied from Sosnowiec.
In 1943 – 1944 thirty modernised BR50 steam locomotives were manufactured by the Ostrowiec Plant in Warsaw. In addition, numerous steam locomotives of French, Belgian and German origin could be seen on the route in Poland. Due to the scarcity of electric rolling stock on the Warsaw railway junction, the Ostbahn resorted to importing five E626 electric locomotives (Bo-Bo-Bo) from Italy to be put into service on the cross-city line.
With regard to adapting the railway to the needs of mass transport of troops and supplies, the Germans, under the so-called Otto plan, started reconstructing the track arrangement on selected stations and building transfer stations on the west-east line. This was the case of the Poznań junction, and shunting stations: Kraków Płaszów Towarowy and Żurawica Rozrządowa. A second, third or even fourth pair of tracks were added on several lines, in particular those in Silesia. During intense two-way trade with the allied Soviet Union, thus until summer 1941, large border stations in Małaszewicze and Terespol were used to transfer goods exchanged between these two countries.
The war production required efficient technical back-up. Thus, some workshops (e.g. in Nowy Sącz) and factories (Chrzanów) were expanded. The steam locomotives and wagons were marked with vainglorious slogans: Alles Rädern mussen rollen für den Sieg! (Wheels must roll for victory!) and “V” signs painted on locomotive smoke-boxes.
In the meantime, Polish railwaymen organised acts of sabotage spontaneously or under emerging conspirators' organisations, to make operation of the railway difficult to a varying degree and extent. Among other things, they poured sand into wagon grease tanks, falsified transport documents, replaced address stickers on wagons, or assigned double numbers to wagons after repairs. The official gazette of Ostbahn of September 1943 listed the numbers of 500 wagons and 200 tankers which were lost while carrying cargo. 25% of tankers of the former Polish State Railways' network were sabotaged. In 1942 every fifth steam locomotive was out of order. Railwaymen provided enormous support in organising illegal deliveries of foodstuffs to cities, in conspiracy carriage of mail and courier mail or hiders and in warning against round-ups at railway stations and in intelligence operations. They were at a risk of severe repressions for such activities.
Prior to the attack on the Soviet Union, railway transport in Poland became particularly significant to the Reich. In the territory of the occupied country the Germans gathered 102 divisions of the Wehrmacht, i.e. nearly 3 million soldiers! Following the outbreak of the war between the Germans and Soviets on 22 June 1941 the Commander-in-Chief of the Polish Armed Forces, General Władysław Sikorski, ordered the chief commander of the Union of Armed Struggle, General Stefan Grot-Rowecki to intensify the sabotage and subversion activities in the Reich and in the direct vicinity of the German army. At that time 420 military transports passed through Poland every day. During sabotage and subversion actions in the second half of 1941 as many as 1935 steam locomotives were damaged and 91 were held in repair workshops, 91 railway transports were derailed and 237 were set on fire. In addition, 2,851 wagons were damaged. At that time Ostbahn employed 150 thousand Polish railwaymen, 60 thousand Polish railway workers, 8.3 thousand Germans and 3.5 thousand rail guards.
Sabotage on railway lines passing near the frontline was further intensified in 1942. The largest achievement of the Warsaw District Union of Retaliation was Operation Wieniec (lit. Operation Corona) in the night of 7/8 October 1942, in which the rails surrounding Warsaw were blown up at the same time.
Then again, during Operation Odwet Kolejowy (Railway Reprisal), in the night of 16/17 October 1942, railway tracks were blown up near Łuków, Dęblin and Biała Podlaska.
A Polish resistance organisation “Wachlarz” (lit. Folding Fan) was formed in summer 1941 in connection with the outbreak of war between Germany and Soviet Russia. The range of activities of “Wachlarz” extended over huge areas in the USSR east from the pre-war border with Poland, and covered the territory from the Baltic Sea to the Kiev region and Podolia. It was divided into 5 sections which converged in Warsaw. Among other tasks “Wachlarz” carried out rail sabotage. There were more than 50 actions, e.g. on the lines around Minsk and Daugavpils.
Operation Bariera (Barrier) interrupted railway traffic at 92 points simultaneously. Actions at German rail transports were also carried out by partisan groups of any political orientation, including Soviet groups.
At the second stage of the war the retreating Germans purposefully destroyed railway lines on their way. They blew up tunnels, bridges, water towers and pump stations. The occupying forces burnt down and demolished railway station buildings and engine houses, and sappers blew up the poles of teletechnical networks. The Germans took machines, tools and rolling stock away to the Reich. 4 out of 11 main workshops were completely destroyed (Warsaw Chmielna, Warsaw-Praga, Eastern Warsaw and Łapy). 80 – 90% of machines and equipment was lost by the workshops in Pruszków, Tarnów and Nowy Sącz. Smaller losses were suffered in Radom, Gdańsk, Poznań and Bydgoszcz. The The Germans stole all equipment and machine tools from the regained territories, from, among other places, Opole, Oleśnica, Świdnica, Ostróda and Stargard Szczeciński. They also took away most machines from Wrocław and from 2 steam locomotive and wagon workshops in Gliwice. Only in Piła was complete equipment saved.
The total losses suffered by Polish railways, also calculated taking into account territories allocated after 1945, amounted to 16 billion zlotys (in pre-war currency). 38% of railway lines, 46% of bridges (including all major bridges), 50% of tunnels, 37% of railway buildings, 6 thousand steam locomotives and 60 thousand wagons were destroyed.