Following the construction of the Bavarian Forest railway from Plattling via Deggendorf to Bayerisch Eisenstein, completed in 1877, and the Ilz Valley railway from Passau to Freyung, finished in 1892, the local communities situated between these routes, including Aicha, Eging and Tittling, also strove to have a railway. They favoured a stub line from Vilshofen to the north. But there was a realisation that against that, one the one hand, the land rose steeply from the Danube valley and, on the other, it would need a bridge across the Danube. After wrestling with the problem for a long time the Royal Bavarian State Railways decided to build a cross-country route between the two existing railways as the most cost-effective solution.