The Bavarian Maximilian Railway (German: Bayerische Maximiliansbahn) was as an east–west line built between the Bavarian border with Württemberg at Neu-Ulm in the west via Augsburg, Munich and Rosenheim to the Austrian border at Kufstein and Salzburg in the east as part of the Royal Bavarian State Railways. The Munich–Augsburg section of the line had already been built by the Munich-Augsburg Railway Company and opened in 1840. The line was named after the reigning King of Bavaria from 1848 to 1864 Maximilian II.