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 under the Gotthard Pass in 1882. A second alpine line was opened under the Simplon Pass in 1906.