High-speed AVE train, Madrid-Barcelona line.
National railwayRenfe Operadora
Infrastructure companyAdif
Major operatorsRenfe, Feve, Euskotren, FGC, FGV
Ridership636 million (2019)[1]
System length
Total16,026 km (9,958 mi)
Electrified10,182 km (6,327 mi)
Track gauge
Broad gauge
1,668 mm (5 ft 5+2132 in)
11,829 km (7,350 mi)
Standard gauge
1,435 mm (4 ft 8+12 in)
3,100 km (1,900 mi)
Metre gauge
1,000 mm (3 ft 3+38 in)
1,926 km (1,197 mi)
Narrow gauge
914 mm (3 ft)
28 km (17 mi)
3000 V DCMain network
25 kV ACHigh-speed lines, recent electrification
Longest tunnelSierra de Guadarrama, 28.4 km (17.6 mi)
Red actual de ferrocarriles de España.svg

Rail transport in Spain operates on four rail gauges and services are operated by a variety of private and public operators. The total route length in 2012 was 16,026 km (10,182 km electrified).[2]

Most railways are operated by Renfe Operadora; metre and narrow-gauge lines are operated by FEVE and other carriers in individual autonomous communities. It is proposed and planned to build or convert more lines to standard gauge,[3] including some dual gauging of broad-gauge lines, especially where these lines link to France, including platforms to be heightened.

Spain is a member of the International Union of Railways (UIC). The UIC Country Code for Spain is 71.


Main article: History of rail transport in Spain

The first railway line in the Iberian Peninsula was built in 1848 between Barcelona and Mataró.[4] In 1851 the Madrid-Aranjuez line was opened. 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.[4]

In 1900 the first line to be electrified was La Poveda-Madrid.[5]

In 1941 RENFE was created and is a state-owned rail network.[4][6]

The last steam locomotive was withdrawn in 1975, in 1986 the maximum speed on the railways was raised to 160 km/h, and in 1992 the Madrid-Seville high-speed line opened,[4] beginning the process of building a nationwide high-speed network known as AVE (Alta Velocidad España).

The current plans of the Spanish government are to finish the standard-gauge high-speed network by building new sections of track and upgrading and converting to standard gauge the existing line along the Mediterranean coast connecting the ports of Barcelona, Tarragona, Valencia, Cartagena and Almería, and to link Madrid with Vigo, Santiago and A Coruña in Galicia, and to extend the Madrid-Valladolid line to Burgos and the Basque cities of Bilbao and San Sebastian and Hendaye on the French border, as well as to link Madrid with Lisbon and the port of Sines through Badajoz. Former plans by the Popular Party government under PM Aznar to link all provincial capitals with high-speed rail have been shelved as unrealistic, unaffordable, and contrary to all economic logic as no European funding would be made available for such projects.

Following the opening of the AVE network, the classic Iberian gauge railways have lost importance in inter-city travel, for example, the Madrid–Barcelona railway takes over nine hours to travel between the two cities stopping at every station. With the Madrid–Barcelona high-speed rail line, the longest possible journey is just three hours.[7] This has allowed the conventional lines to increase focus on regional and commuter traffic, along with freight. Some lines, including the Córdoba-Bobadilla section of the classic Córdoba–Málaga railway, have lost passenger traffic completely due to the opening of AVE serving the same destinations.

Many important mainland Spanish towns remain disconnected to the rail network, the largest being Marbella with a population of over 140,000, along with Roquetas de Mar (pop. 96,800), El Ejido (pop. 84,000), Chiclana de la Frontera (pop. 83,000) and Torrevieja (pop. 82,000). Other towns and municipalities are not on the national rail network but linked to light rail or metro systems, such as Santa Coloma de Gramanet, Barcelona (pop. 118,000); Getxo, Biscay (pop. 80,000); Torrent, Valencia (pop. 79,000); and Benidorm, Alicante (pop. 69,000).

Starting in Franco's regime and continuing into the 1980s, multiple lines of the Spanish rail network were closed. Campaigns for reopening former lines exist, including a reopening the branch to the aforementioned Torrevieja from the Alicante–Murcia main line;[8] the former line from Guadix to Lorca via Baza[9] (which would provide a direct rail link from Murcia to Granada); Plasencia to Salamanca[10] and Gandía to Dénia.[11]

From 1 September to 31 December 2022 Spain has made free train tickets available under certain conditions. A €10 to €20 deposit must be placed and the scheme is only available on multi-trip tickets or season tickets, rather than singles. 16 or more train journeys must be made between the aforementioned dates in order to receive a full refund.[12] The full refund is available on commuter journeys and medium-distance journeys of under 300km (186 miles).[6] The initiative is being funded via a windfall tax on banks and energy companies that have made profits from interest rates and energy prices. The tax will be introduced in 2023 and is estimated to raise up to €7 billion in two years. Money raised from the tax will also be used to build 12,000 new homes and fund youth scholarship programmes.[12]



Conventional Iberian gauge lines

High-speed standard gauge lines


Under construction

Narrow gauge lines

See also: Narrow gauge railways in Spain

In Spain there is an extensive 1,250 km (780 mi) system of metre gauge railways.

Metro/light rail systems

Bilbao metro
Metro (red) and tram (green) networks in Spain
Metro (red) and tram (green) networks in Spain

Rail links with adjacent countries

Andorra has no rail system


In 2004, the Spanish government adopted a new strategic plan for transportation through 2020 called the PEIT (Strategic Plan for Infrastructures and Transport). This detailed rail subsidies of around €9.3 billion annually on average from 2005-2020. In 2010, it rolled out a two-year plan to invest an extra €11 billion each year for two years, as a part of a financial stimulus in response to the global downturn.[13] In 2015, the federal budget for the railways was €5.1 billion.[14]

See also


  1. ^ "Los usuarios de avión suben un 6,4% en 2019 y los del AVE aumentan un 4,9%". El País (in Spanish). 11 February 2020. Retrieved 13 April 2020.
  2. ^ CIA – The World Factbook – Spain
  3. ^ Verkehrsrundschau, 2007-04-30
  4. ^ a b c d Significant events in the history of Spanish infrastructures and railways Archived 2009-09-04 at the Wayback Machine See also
  5. ^ Ferrotransmadrid Archived 2013-10-12 at the Wayback Machine
  6. ^ a b Gadhavi, Jasmine (15 July 2022). "Spain announces free rail journeys from September until the end of the year". The Guardian. Retrieved 22 September 2022.
  7. ^ "Horarios PDF -". Renfe. Retrieved 31 August 2019.
  8. ^ "The wait goes on for the Torrevieja Railway". 15 May 2019.
  9. ^ "Concentración en Baza para pedir el tren entre Andalucía y Murcia y combatir la España vaciada". Granada Hoy (in Spanish). 31 December 2019. Retrieved 4 April 2020.
  10. ^ "La Junta de Extremadura reclama ahora reabrir la línea ferroviaria sin vías de Plasencia a Salamanca". La Gaceta de Salamanca. 9 April 2019. Retrieved 4 April 2020.
  11. ^ "Todo el PP de la Marina Alta pacta una estación para el tren Dénia-Gandia que esté en La Xara". La Marina Plaza (in Spanish). 12 March 2020. Retrieved 4 April 2020.
  12. ^ a b Frost, Rosie (1 September 2022). "Spain launches free train tickets throughout autumn, thanks to a windfall tax". Euronews. Retrieved 22 September 2022.
  13. ^ "Global Competitiveness in the Rail and Transit Industry p. 20-21" (PDF).
  14. ^ "Spanish railways battle profit loss with more investment". 17 September 2015. Retrieved 10 March 2016.