After the foundation of the Gotthard Railway Company in December 1871, construction of the Gotthard Railway began in 1872. The construction of the valley floors in the
Canton of Ticino progressed considerably faster than the complicated main line in the Alpine region. The concession for the Gotthard Railway included in
Sopraceneri, among other things, a branch line through the Magadino plain to
Locarno, which was completed after a short construction period at the end of 1874. The Biasca–Bellinzona section was opened on 6 December 1874 and the opening of the Bellinzona–Giubiasco–Cadenazzo–Locarno section through the Magadino plain followed a few days later on 20 December. This line remained an island operation without connection to another standard gauge line for over seven years. The connection to the railway in the
Sottoceneri valley (Lugano–Chiasso), over
Monte Ceneri, was only opened on 10 April 1882 as part of the Immensee–Chiasso main line of the Gotthard Railway, which entered into full service on 1 June 1882. Since then, the Biasca–Bellinzona–Giubiasco valley section has been considered to be part of the Gotthard main line, while the Giubiasco–Locarno section is treated as a branch line of the Gotthard Railway. The latter continues to use the chainage from Immensee—the "null kilometre point" of the Gotthard Railway. A second cross-border line between the Gotthard and Italy was opened on 4 December 1882; it branches off the Giubiasco–Locarno line at Cadenazzo and runs from there to
Luino. The Gotthard Railway Company was nationalised as of 1 May 1909, which meant that the whole GB network became the property of the Federal Railways. Under the SBB, the line was electrified with single-phase alternating current (
15 Kilovolt, Hertz) and electrical operations started on 15 May 1936. The Giubiasco–Cadenazzo section, which is used both by trains to Locarno and to Luino, was built as double-track, with the second track being opened on 17 May 1953. A new track alignment was put into operation between the stations of Tenero-Gordola and Locarno on 23 March 1980. The original line was shifted uphill, which involved extending it by about 600 metres. Construction of the new line involved the construction of the Mappo bridge and the Rocca-Bella tunnel. The former Riazzino-Cugnasco station was replaced by the halt of
Riazzino about 900 metres to the west in 2009. == Operations==