The Treuchtlingen–Würzburg railway is a 140 km long main line in the northwest of the German state of Bavaria. It runs from Treuchtlingen in southern Middle Franconia through Gunzenhausen, Ansbach, Steinach (b Rothenb), Marktbreit and Ochsenfurt to the capital of Lower Franconia, Würzburg. It was opened in three separate sections and is one of the oldest lines in Germany. History The line was built in three sections: the line from Ansbach to Gunzenhausen was opened on 1 July 1859, the line from Würzburg to Ansbach was opened on 1 July 1864 and the line from Gunzenhausen to Treuchtlingen was opened on 2 October 1869. Ansbach initially had no connection with the Ludwig South-North Railway, completed between Nuremberg and Augsburg in 1849. It decided to finance a railway to Gunzenhausen. This was the third railway in Bavaria operated under lease by the Royal Bavarian State Railways after the Neuenmarkt–Bayreuth (1853) and Pasing–Starnberg (1854) railways. The rest of the Treuchtlingen–Würzburg line was only completed after the enactment of the Railway Construction Act of 1861. The line was completed on 2 October 1869 with the Gunzenhausen–Treuchtlingen section, which was built as the northern part of the Altmühl Railway, which runs from Treuchtlingen through the Altmühl valley through Eichstätt to Ingolstadt. The continuous double-track line has been electrified since 15 March 1965. In 1978, as part of a pilot project, the operation of passenger services ended at a total of 15 stations, being replaced by bus services. Freight operation ended at many stations in 1993. On the evening of 18 July 2016, there was an attack on a regional train on the section between Ochsenfurt and Würzburg in which a 17-year-old Afghan refugee attacked passengers with an ax and a stabbing weapon and caused serious injuries to some of them. The perpetrator was shot by special forces during his attempted escape in the Würzburg district of Heidingsfeld. It is assumed that there may be an Islamist connection. Route The route is 140 km long and once had 29 stations, of which 15 are still served. The route is double track throughout and has been fully electrified since 15 March 1965. Transport associations Regional transport services on the northern section from Würzburg to Marktbreit are organised by the Verkehrsverbund Mainfranken (Mainfranken Transport Association, VVM), established in 2004. From Uffenheim to Treuchtlingen they are organised by the Verkehrsverbund Großraum Nürnberg (Greater Nuremberg Transport Association, VGN) Operations