The history of rail transport in Spain begins in the 19th century. In 1848, a railway line between Barcelona and Mataró was inaugurated,[1] although a line in Cuba (then a Spanish overseas province) connecting Havana and Bejucal had already opened in 1837.[2] In 1852 the first narrow gauge line was built, in 1863 a line reached the Portuguese border. By 1864 the Madrid-Irun line had been opened, and the French border reached.[1]
In 1911 the first line to be electrified was the Gergal-Santa Fe line.[1]
The last steam locomotive was withdrawn in 1975, in 1986 the maximum speed on the railways was raised to, and in 1992 the Madrid Seville high speed line opened,[1] beginning the process of building a nationwide high speed network.
Railway transport was first developed in Northern Europe during the 19th century, spurred not only by rapid economic growth, but also by landscapes favourable to railway construction. The mountainous terrain, low population density, relatively weak 19th century economic development and political up-and-downs hindered the development of the railway network in Spain.[3] There was an operating railway in the island of Cuba since 1837: The Havana–Bejucal stretch of the Havana–Güines line was finished in 1837, and the full line in 1838.[4] The first line to be built in the Peninsula was a short link from Barcelona to Mataró opened in 1848. Prior to 1854, the only lines built in Mainland Spain were Barcelona–Mataró, Madrid–Aranjuez (prolonged to Albacete), Langreo–Gijón and Valencia–Játiva. The development of a true railway network began under the overarching legal frame of the 3 June 1855 Ley General de Caminos de Hierro, during the bienio progresista.[5]
A major company, the (MZA), was constituted in 1856 as joint venture of the Marquis of Salamanca and the Rothschilds.[6] Primarily led by the Péreires, its main rival was the Compañía de los Caminos de Hierro del Norte de España ('Norte'), constituted in 1858.[7]
One key development was the decision, taken at an early stage, that Spain's railways should be built to an unusual broad track gauge of, or six Castilian feet). Some believe that the choice of gauge was influenced by Spain's hostility to neighbouring France during the 1850s: it was believed that making the Spanish railway network incompatible with that of France would hinder any French invasion.[8] Other sources state that that decision was taken to allow bigger engines that could have enough power to climb the steep passes in the second most mountainous country in Europe. As a result, Portuguese railways were also built to a broad gauge (roughly the same,, but rounded to a Portuguese unit). In 1955 Spain and Portugal decided to halve this difference of 8mm, and defined their gauge to be, called Iberian gauge.
The decision for an Iberian gauge would later come to hinder interoperability of rail services with France, and it also made railway construction more expensive. Apart from the widespread broad-gauge lines, a large system of narrow gauge railways was built in the more mountainous parts of Spain, especially in the north coast of the country, where narrow gauge was the most adequate option. In 2023 transport officials in RENFE in Spain resigned when it was found that narrow-gauge passenger rolling-stock ordered in 2020 for the northern regions of Asturias and Cantabria would be too wide for the tunnels and were to be redesigned with delays of a year or two in delivery.[9]
The main-line network was roughly complete by the 1870s. Because of Spain's (until recently) relative lack of economic development, the Spanish railway network never became as extensive as those of most other European countries. For instance, in terms of land area Spain is about 2.5 times the size of Great Britain but its railway network is about 3000km (2,000miles) smaller.
During the Spanish Civil War in the 1930s the railway network was extensively damaged.
Immediately after the war Francoist Spain nationalized the broad gauge network, and in 1941 RENFE was formed. Narrow gauge lines were nationalized in the 1950s, later being grouped to form FEVE.
It took many years for the railway system to recover from the war. In spite of this, innovators like Goicoechea created advanced trains like the Talgo and the TER. Only with the Spanish transition to democracy in 1975, did the Spanish railway network begin to modernize and catch up with the rest of Europe.
Following the decentralization of Spain after 1978, those narrow gauge lines which did not cross the limits of autonomous communities of Spain were taken out of the control of FEVE and transferred to the regional governments, which formed, amongst others, Eusko Trenbideak and Ferrocarrils de la Generalitat de Catalunya. Madrid (Madrid Metro), Barcelona, Valencia and Bilbao (Metro Bilbao) all have autonomous metro services.
In 1986/7, many radial routes were closed: thousands of kilometres of passenger lines were axed.
The Railway Sector Act of 2003 separated the management, maintenance and construction of rail infrastructure from train operation. The former is now the responsibility of Administrador de Infraestructuras Ferroviarias (ADIF), while Renfe Operadora ('Renfe') owns the rolling stock and remains responsible for the planning, marketing and operation of passenger and freight services (though no longer with a legal monopoly).
See main article: High-speed rail in Spain. In recent years Spain's railways have received very heavy investment, much of it coming from the European Union. In 1992, a standard gauge high-speed rail line (AVE) was built between Madrid and Seville. In 2003, high-speed service was inaugurated on a new line from Madrid to Lleida and extended to Barcelona in 2008. The same year, the lines from Madrid to Valladolid and from Córdoba to Málaga were inaugurated.
The Madrid-Barcelona line is being extended onwards via an international Perthus Tunnel beneath the Pyrenees to Perpignan where it will link up with the French TGV high-speed system. Although the LGV Perpignan-Figueres is finished on the French side, delays on the part of the French government in authorizing construction on its side of the border held up Spanish plans to some extent, and the Spanish side will not be finished until 2012. Further high-speed links are under construction from Seville to Cádiz, from Madrid to Valencia and to Lisbon. The Basque Y, also under construction, will link the three Basque cities.
In June 2011, RENFE announced they would suppress the three daily high-speed trains between Toledo, Cuenca and Albacete because of lack of passengers despite an investment of 3.5 billion euros (this figure includes the full Madrid-Cuenca-Valencia high-speed railway and the Cuenca-Albacete branch – later extended to Alicante, Murcia and, soon, Valencia – construction costs).[10] Some media stated that the average number of daily passengers was 9 between Toledo and Albacete and 6 between Toledo and Cuenca while the daily cost was 18,000 euros, while official figures give us an average of 403–464 daily passengers.[11] Those trains ran over existing high speed lines (the lines to Toledo, Seville and Valencia) and so the lines remain open, but passengers travelling between the cities had to change trains at Madrid. However, in 2022, as the Madrid-Cuenca-Valencia traditional railway was closed, trains between Toledo, Cuenca and Albacete have been reinstated, this time operated as Avant, catering better to the needs of passengers than the AVE trains that were operated in 2011.
Standard gauge was adopted in Spain partly in view of the desire to integrate with the rest of Europe, and the rest of Africa. If it uses the UIC loading gauge width of 3150mm then there would be inconsistency with the 3400mm width of the futuristic African Integrated High Speed Railway Network.
Thus UIC width trains can happily work on OSShD platforms with a wider gap, but not the other way round.