The Berlin S-Bahn began on 8 August 1924 with the first section from Stettiner Vorortbahnhof to Bernau using steam locomotives. On 13 August 1961, it was broken up when the Berlin Wall was built, resulting in two sections: the eastern part and the western part. The western part experienced a massive strike which resulted in closure of several stations, after declining use. Attempts were made to reopen at various times but in the end, only three lines were finally opened after the strike. Since 9 November 1989, when the Berlin Wall was opened, the Berlin S-Bahn began to expand rapidly with their budgetary costs.

Before S-Bahn The first line was opened from Zehlendorf to Potsdam in 1838. Until 1846, the city already counted five terminal stations, one of which resulted in almost all routes. Until 1882 four more stations were added. In order to connect the lines together, in 1851, the Berlin connection path along the former city wall was built at ground level. They circumnavigated the urban area in a three-quarter circle from Stettiner, the Hamburger, the Potsdamer and Anhalter Bahnhof to the Frankfurt train station. The constant traffic, particularly by the military, disabled strongly in passenger transport by road, so a new solution was contemplated.

The Berlin Ringbahn was opened on 1870s, followed by the true Berlin Stadtbahn which goes from Schlesischen Bahnhof to Charlottenburg. The rapid growth of the city and suburban traffic grew immensely. In the following years, other sections to Bernau and Königs Wusterhausen were provided with a second pair of tracks.

With individual sections dating from the 1870s, the S-Bahn was formed by and by as the network of suburban commuter railways running into Berlin, then interconnected by the circular railway connecting the various terminal railway stations, and in 1882 enhanced by the east–west cross-city line (called the "Stadtbahn", "city railway"). The forming of a distinct identity for this network began with the establishment of a special tariff for the area which was then called the "Berliner Stadt-, Ring- und Vorortbahnen", and which differed from the normal railway tariff. While the regular railway tariff was based on multiplying the distance covered with a fixed price per kilometer, the special tariff for this Berlin tariff zone was based on a graduated tariff based on the number of stations touched during the travel.

Electrification The core of this network, that is the cross-city ("Stadtbahn") East–west line and the circular Ringbahn, and several suburban branches were converted from steam operation to a third-rail electric railway in the latter half of the 1920s. The Wannsee railway, the suburban line with the highest number of passengers, was electrified in 1932/33. A number of suburban trains remained under steam, even after the Second World War.

Timeline of electrifications Date Stretch Length(in m) 1 July 1903 Potsdamer Ringbahnhof – Lichterfelde Ost (550 V DC) 9,087 8 August 1924 Stettiner Vorortbahnhof – Bernau 22,676 5 June 1925 Gesundbrunnen – Birkenwerder 18,019 4 October 1925 Birkenwerder – Oranienburg 7,765 16 March 1927 Schönholz-Reinickendorf – Velten 21,162 11 June 1928 Potsdam – Stadtbahn – Erkner 57,168 10 July 1928 Wannsee – Stahnsdorf 4,135 23 August 1928 Charlottenburg – Spandau West 9,279 6 November 1928 Charlottenburg – Südring – Grünau 25,883 Neukölln – Warschauer Straße 5,677 Schlesischer Bahnhof – Kaulsdorf 11,258 1 February 1929 Charlottenburg – Nordring – Baumschulenweg 25,755 Frankfurter Allee – Warschauer Straße 0,580 Niederschöneweide-Johannisthal – Spindlersfeld 3,972 18 April 1929 Potsdamer Ringbahnhof – Papestraße 3,440 Potsdamer Ringbahnhof – Ebersstraße 1,060 Halensee – Westend 2,713 2 July 1929 Potsdamer Ringbahnhof – Lichterfelde Ost (conversion to 800 V DC) 9,087 18 December 1929 Jungfernheide – Gartenfeld 4,460 15 December 1930 Kaulsdorf – Mahlsdorf 1,366 15 May 1933 Potsdamer Wannseebahnhof – Wannsee 18,988 Potsdamer Bahnhof – Zehlendorf Mitte (main line track) 11,960 Wannsee Railway–Zehlendorf Mitte mainline link 1,040 28 July 1936 Humboldthain – Unter den Linden 2,691 Heerstraße – Reichssportfeld 1,467 15 April 1939 Unter den Linden – Potsdamer Platz 0,941 Priesterweg – Mahlow 11,595 9 October 1939 Potsdamer Platz – Großgörschenstraße 4,243 6 November 1939 Anhalter Bahnhof – Yorckstraße 1,571 6 October 1940 Mahlow – Rangsdorf 7,396 8 September 1943 Lichterfelde Ost – Lichterfelde Süd 2,668

S-Bahn during Nazi Germany (1933 - 1945) After building the east–west cross-city line connecting western suburban lines, which until then terminated at Charlottenburg station with eastern suburban lines which terminated at Frankfurter Bahnhof (later Schlesischer Bahnhof), the logical next step was a north–south cross-city line connecting the northern suburban lines terminating at Stettiner Bahnhof with the southern suburban lines terminating at the substations of the Berlin Potsdamer Bahnhof. The first ideas for this project emerged only 10 years after the completion of the east–west cross-city line, with several concrete proposals resulting from a 1909 competition held by the Berlin city administration. Another concrete proposal, already very close to the final realisation, was put forth in 1926 by the Breslau university professor Jenicke.

The decision to build was taken in 1933, as part of the public works programme undertaken by the new Nazi government to reduce unemployment. The projects do include: Construction of this Nord-Süd-S-Bahn (North-South S-Bahn), as it was called, began in 1934, with a tunnel from Berlin Anhalter Bahnhof to Berlin Stettiner Bahnhof (today 'Nordbahnhof') as its core section. A first phase, from the north to Unter den Linden was opened just in time for the 1936 Berlin Olympics; the southern section, via Potsdamer Platz, opened the month after the Second World War began, in October 1939. Construction of the Ost-West S-Bahn, which is supposed to go from Anhalter Bahnhof to Görlitzer Bahnhof via Oranienplatz, and to join Görlitzer Bahn. Extension of the suburban lines to Rangsdorf, Lichterfelde, and Reichssportfield.

The Nazis' 1939 "World Capital Germania" planning called for services to eventually run as follows: Zuggruppe Line Stations Stretch Notes Bernau/Oranienburg – Wannsee 31/35 Stettiner/Nordbahn, Nord-Süd-Tunnel, Wannseebahn Velten (Mark) – Ludwigsfelde 28 Kremmener Bahn, Tiergartentunnel, Anhalter Bahn Nauen/Wustermark – Wünsdorf 38/37 Lehrter/Hamburger Bahn, Tiergartentunnel, Dresdener Bahn Stettiner Bahnhof – Vollring – Stettiner Bahnhof 44 Ringbahn, Nord-Süd-Tunnel über Südringspitzkehre Jungfernheide – Gartenfeld 4 Siemensbahn Halensee – Strausberg 27 Stadtbahn, Ostbahn Spandau West – Grünau 29 Spandauer Vorortbahn, Stadtbahn, Görlitzer Bahn Schöneweide – Spindlersfeld 3 Zweigbahn Schöneweide–Spindlersfeld Königs Wusterhausen – Anhalter Bahnhof 18 Görlitzer Bahn, Innenstadttunnel weiter als ZGr. 1 Potsdam – Erkner 32 Wetzlarer Bahn, Stadtbahn, Frankfurter Bahn Wannsee – Lichterfelde Ost 10 verlängerte Friedhofsbahn, Anhalter Bahn

During and after World War II

Many sections of the S-Bahn were closed during the war owing to enemy action. The Nord-Süd-Bahn tunnel was flooded on 2 May 1945 by retreating SS troops during the final Battle of Berlin. The exact number of casualties is not known, but up to 200 people are presumed to have perished, since the tunnel was used as a public shelter and also served to house military wounded in trains on underground sidings. Service through the tunnel commenced again in 1947.

After hostilities ceased in 1945, Berlin was given special status as a "Four-Sector City," surrounded by the Soviet Occupation Zone, which later became the German Democratic Republic (GDR). The Allies had decided that S-Bahn service in the western sectors of Berlin should continue to be provided by the Reichsbahn (DR), which was by now the provider of railway services in East Germany. (Rail services in West Germany proper were provided by the new Deutsche Bundesbahn.)

During the war, Berlin S-Bahn cars were overhauled at Luben to the east of Berlin. Since that town, now known as Lubin, was ceded to Poland under the terms of the Potsdam Agreement in 1945, 84 cars currently in the works were thus lost by Berlin. Further cars were sent east as war reparations, and eventually at least 287 cars were sent to the Soviet Union where they were converted for use in Moscow, Kiev, and Tallinn. Additionally at least 80 two-car sets were retained in Poland, where they were used on suburban services in the Gdańsk-Gdynia region until 1976. Some of the latter cars were then converted for use in overhead line maintenance trains, and some still exist in that role. One set is preserved in its Gdańsk-Gdynia condition at a museum at Kościerzyna near Gdynia.

Post-War The first new railway line built after the war was opened on 7 March 1947, while post-war reconstruction was still ongoing. It ran from Mahlsdorf to the next station, Hoppegarten in Brandenburg. Approximately one and a half years later, Strausberg also connected to the grid. The construction proceeded quickly as preparations had been already made for this purpose.

After the end of the war, most of the depots in West Berlin were planned. New stretches were created, such as Jungfernheide – Spandau – Staaken/Falkensee, Lichterfelde Süd – Teltow, and Grünau – Königs-Wusterhausen. The steam-powered suburban traffic on these routes were mostly withdrawn to the new S-Bahn terminus.

Before the construction of the Berlin Wall, the Berlin S-Bahn continued to expand regularly:

Date Stretch Length(in m) 7 March 1947 Mahlsdorf – Hoppegarten 4,374 15 June 1948 Zehlendorf – Düppel 2,300 1 September 1948 Hoppegarten – Fredersdorf 5,949 31 October 1948 Fredersdorf – Strausberg 4,977 30 April 1951 Grünau – Königs Wusterhausen 14,061 7 July 1951 Lichterfelde Süd – Teltow 2,700 30 July 1951 Spandau West – Falkensee 6,614 3 August 1951 Spandau West – Staaken 3,470 28 August 1951 Jungfernheide – Spandau 6,170 25 December 1952 Schönhauser Allee – Pankow(freight tracks) 2,942 3 June 1956 Strausberg – Strausberg Nord(Shuttle before 1968) 9,136

Cold War

As relations between East and West began to sour with the coming of the Cold War, the Berlin S-Bahn soon became a victim of the hostilities. Although services continued operating through all occupation sectors, checkpoints were constructed on the borders with East Berlin and on-board "customs checks" were carried out on trains. From 1958 onward, some S-Bahn trains ran non-stop through the western sectors from stations in East Berlin to stations on outlying sections in East Germany so as to avoid the need for such controls. East German government employees were then forbidden to use the S-Bahn since it travelled through West Berlin.

The western sectors of the city were physically cut off from East Germany on 13 August 1961, by what was later called the Berlin Wall, in a well-prepared plan to separate the two halves of the city – and at the same time, to divide the Berlin public transit network into two separate systems.