The Murg Valley Railway () is a 58 kilometre long railway line in the Northern Black Forest in Germany, that links Rastatt and Freudenstadt. It was opened in stages from 1868 to 1928 being built outwards from both Rastatt and Freudenstadt. The route through the narrow Murg Valley required the construction of numerous tunnels and bridges. The section between the stations of Baiersbronn and Freudenstadt Stadt is a steep ramp which is why it had to be operated until 1926 as a rack railway. Even today it can only be worked by vehicles that have the required approval.

After the occasional long-distance passenger services had been withdrawn in the 1990s, the Murg Valley Railway was integrated into the network of the Karlsruhe Stadtbahn between 2002 and 2004. Since then it has been operated by Albtal-Verkehrs-Gesellschaft (AVG), using their fleet of tram-trains. At Freudenstadt, these meet the services of the Ortenau S-Bahn (OSB), operating over the Kinzig Valley Railway to Offenburg.

History The line was constructed over the course of 60 years due to the difficult topography of the Murg valley, the numerous engineering works required and the fact that the lower Murg valley belonged to the Grand Duchy of Baden, while the upper Murg valley belonged to the Kingdom of Württemberg. This resulted in different transport policy interests, which prevented a single approach to long-term planning. So initially local interests in the lower Murg valley took the first steps in building the Murg Valley Railway. Over several decades the line emerged between Rastatt and Freudenstadt, starting as two branch lines at each end until the last remaining gap could be closed on the former border, which lies between Kirschbaumwasen and Schönmünzach.

Murg Valley Railway Company (1868-1894) For centuries the Murg valley timber trade had been dependent on rafting until the middle of the 19th century, when the processing of timber increasingly shifted to higher value products, which could not be transported as a raft, including railway sleepers. The construction of roads in the narrow Murg Valley was particularly expensive. As neighboring Württemberg in the 1860s was already planning for the Enz Valley Railway and the Nagold Valley Railway, the local timber industry feared the loss of its ability to compete.

This showed that the valley needed an efficient transport link over its own railway. The Grand Duchy of Baden State Railways (Großherzogliche Badische Staatsbahn) had no interest, however, in the construction of such a line at that time because its financial resources were exhausted by the construction of major trunk lines. The private Murg Valley Railway Company (Murgthal-Eisenbahn-Gesellschaft) was founded in 1867, mainly at the instigation of Gernsbach timber manufacturer Casimir Rudolf Katz, with the aim of building a branch line from Rastatt to Gernsbach.

After receiving the concession for the line, construction started on 19 August 1868. Nine months later, on 31 May 1869, the 15 kilometer-long line was inaugurated. The line was operated by the Baden State Railways on behalf of the Murg Valley Railway Company.

The construction of the railway line in the lower Murg valley accelerated the Industrial Revolution around the towns of Gaggenau and Gernsbach. The Gaggenau ironworks, opened in 1873, was the first major industrial operation in the district. Further upstream a centre of paper production developed from the 1880s with the establishment of several factories, aided by the substantial resources of forests and water. Soon, industrial companies requested an extension of the line to the south from Gernsbach. Initially the extension of the line as a horse-drawn railway was considered, but failed to proceed due to lack of funding. Only in 1888 was a new initiative successful. After the grant of a license and the building of the rail facilities, an extension was put into operation from Gernsbach to Weisenbach on 1 May 1894. Again the line was owned by the Murg Valley Railway Company and operated by the Baden State Railways.

Construction by the state railways of Wurttemberg and Baden (1894–1919) Freudenstadt, which is situated high above the upper Murg valley, had in 1879 received a connection towards Stuttgart with the completion of the Gäu Railway, part of the Württemberg rail network. Because of the difficult topographical conditions, the station, now Freudenstadt Central Station (Freudenstadt Hauptbahnhof), is located well to the south of the centre of the town. In order to improve the integration of Freudenstadt and serve the upper Murg valley better, the parliament of Württemberg decided in 1898 to build a branch line from the Freudenstadt central station via Baiersbronn to Reichenbach Priory (Klosterreichenbach).

Because of the large differences in height between Freudenstadt and Baiersbronn, the routing of the line was difficult. Finally, the Freudenstadt Central Station–Freudenstadt Stadt–Baiersbronn section was adopted, with maximum gradients of up to 5.0 percent, as a rack railway using the Riggenbach-Klose system. The station buildings were built according to various types of standardised designs to limit costs. The Royal Württemberg State Railways started operations to Klosterreichenbach on 20 November 1901.

On 1 July 1904 the Grand Duchy of Baden State Railways took over the lower Murg Valley Railway from the Murg Valley Railway Company, so that ownership and operations were now integrated. With the decision of the Baden parliament to complete the railway network in 1900, the foundations for further construction of the Murg Valley Railway were created. This provided for the extension of the lower Murg Valley Railway from Weisenbach to the border. However, the alignment of the route proved to be difficult because of the topography: the six-kilometre section from Weisenbach to Forbach required the construction of seven tunnels, three major bridges and major earthworks. On 14 June 1910, the Weisenbach–Forbach section was put into operation after three years of construction and this was followed by the section to Raumünzach opened on 4 May 1915. Completion of the line to the border was prevented by the First World War.

Closing of the gap by Deutsche Reichsbahn While the desire was expressed for a continuous Murg Valley Railway from Rastatt to Freudenstadt in Baden quite early, the state of Württemberg behaved rather negatively, as there was a fear that traffic from the northern Black Forest would migrate towards Karlsruhe, while at that time freight and passengers mainly travelled over the line to Stuttgart. With the completion of negotiations of a treaty in 1908 covering the design and construction of the line and regulating cross-border railway operations, Wurtemberg finally agreed to a continuous Murg Valley Railway. Nevertheless, the ratification of this treaty was delayed to 1912. It was planned to close the gap in 1916. Despite the signing of contracts, however, no construction work started on the Württemberg section.

The founding of Deutsche Reichsbahn in 1920 overcame the conflicts of interest between Baden and Württemberg, leading to the missing intermediate section between Raumünzach and Klosterreichenbach finally being commissioned on 13 July 1928. This made possible the operations of trains from Rastatt to Freudenstadt, but locomotive still had to be changed for the trip up the steep line in Freudenstadt.

The construction of the Schwarzenbach dam from 1922 to 1926 led to substantial traffic at Raumünzach station, since materials were conveyed with the help of a light railway (Feldbahn) from Raumünzach station.

Second World War During the Second World War was the Murg Valley Railway was at first spared from damage. It was not until the advance of the front in September 1944 that several attacks by fighter-bombers and artillery caused damage and line closures, mainly affecting Rastatt station.Scharf and Wollny, Vol. 2, p. 73-76 The attack on Freudenstadt at the end of 1944, severely damaged the railway facilities at the southern terminus of the line and completely destroyed Freudenstadt Stadt station. The most serious damage to the Murg Valley Railway, however, was not carried out by the Allies, but inflicted by retreating German troops in April 1945, when they destroyed the Murg bridges in Weisenbach, Langenbrand and Forbach and the Christophstal viaduct.

After the war, the destroyed bridges and line were reconstruction over five years. First, trains could only run between Rastatt and Weisenbach. At the end of 1945 an additional shuttle service was established between Raumünzach and Baiersbronn.Scharf and Wollny, Vol. 2, p. 79-83 After the restoration of Murg bridges in Weisenbach and Langenbrand, services on the line between Weisenbach and Forbach were resumed in July 1947. The gap between Forbach and Raumünzach was closed in November 1947. Freudenstadt Stadt station was reached from the south in October 1948. After the restoration of the Christophstal viaduct, trains could run over the whole Murg Valley Railway on 14 May 1950.

Deutsche Bundesbahn operations after the Second World War

In 1966 steam locomotives on the Murg Valley Railway were replaced by diesel locomotives, which allowed the dropping of the locomotive change for the steep section and led to an acceleration of services. This allowed travel times to be reduced from the approximately two and a half hours for the Rastatt–Freudenstadt route during the steam locomotive era to around one hour and 20 minutes.Scherff, p. 75Scherff, p. 170

The increasing economic pressure on Deutsche Bundesbahn in the 1980s led to rationalisation measures. Therefore, the lightly used stops at Friedrichstal, Kirschbaumwasen, Raumünzach and Au were abandoned and the crossing loops in Hilpertsau, Raumünzach and Klosterreichenbach were dismantled. Above all, the parallel federal highway 462 was increasingly competitive with the Murg Valley Railway.Scherff, p. 82

In the late 1980s, class 628 diesel multiple units (DMUs) were used alongside the locomotive-hauled trains on the Murg Valley Railway, but they were not approved to operate over the steep section and therefore could only operate between Rastatt and Baiersbronn.Scherff, p. 78f In the interim, class 627.0 DMUs took over operations between Baiersbronn and Freudenstadt.Scherff, p. 79

In 1995, the timetable was improved by the introduction of an approximately hourly service. Similarly, DMUs were largely replaced with locomotive-hauled trains. In addition until the mid-1990s, some D-trains or InterRegio trains also ran on the line; these were important for the tourism from the Ruhr area to the northern Black Forest.

Modernisation and conversion to light rail operation Preliminary proposals for the integration of Murg Valley Railway with the Karlsruhe Stadtbahn were developed in the early 1990s. Since the Murg Valley Railway axis extends centrally through the settlements of the Murg, there were a large number of potential passengers who were not using the existing undeveloped rail services.