The construction and operation of Swiss railways during the 19th century was carried out by private railways. The first internal line was a 16 km line opened from Zürich to Baden in 1847. By 1860 railways connected western and northeastern Switzerland. The first Alpine railway to be opened was under the Gotthard Pass in 1882. A second alpine line was opened under the Simplon Pass in 1906.
In 1901, the major railways were nationalised to form Swiss Federal Railways. During the first half of the twentieth century they were electrified and slowly upgraded. After the Second World War, rail rapidly lost its share of the rail market to road transport as car ownership rose and more roads were built. From 1970, the Federal Government has become more involved in upgrading the railways, especially in urban areas and on trunk routes under the Rail 2000 project. In addition, two major trans-alpine routes — the Gotthard Railway and the Lötschberg approach to the Simplon Tunnel — are being re