On the right track? Railways and population dynamics in Spain, 1860-1930

Author: Guillermo Esteban-Oliver

Read the full paper here

Spain has a much lower proportion of inhabited territory and a significantly greater spatial concentration of population than the rest of Western Europe: approximately 90% of its population lives in only 30% of the national territory (Gutierrez et al., 2020). Although this pattern dates from the pre-industrial period, it has considerably intensified since the mid-19th century, when industrialization began to notably influence the country’s demographics.

This article explores how 19th century railways shaped population dynamics in a key period of Spanish history. According to New Economic Geographic (NEG) models, economic activity and population tend to become more spatially concentrated when transport costs fall (Krugman, 1991; Fujita et al., 1999;  Lafourcade, 2011). However, the predicted effect is often heterogeneous, most favouring larger settlements and the best endowed territories (Martinez-Galarraga et al., 2021). Then, in theory, railways could have reinforced existing hierarchies and contributed to further spatial divergence.

To analyse the effect that railways had on Spanish population dynamics a novel dataset that includes all the homogeneous municipalities on the peninsula (7,755) during the period 1860-1930 was created. This contains data on population and rail accessibility, amongst other features. We followed a cross-section approach to assess whether the accessibility gained in the first (1860-1877) and second (1877-1900) waves of railway expansion induced population growth in the short (1877-1900) and long (1877-1930) run. Then, to examine whether railways led to further spatial divergence we analysed if their impact was affected by the municipal population size and density, and the structural occupation and factor endowment of the traversed areas in the pre-railway era. We also analysed whether municipal altitude mattered, since today is one of the key factors for risk of depopulation in Spain (Gutierrez et al., 2020).

To address OLS endogeneity and establish causality we followed Bogart et al. (2021) and introduced an Instrumental Variable (IV) strategy based on optimal routes, or least-cost paths (LCPs), between nodes: cities and towns that were of special economic or political relevance in the past (Map 1). This source of exogenous variation revealed minor increases in population growth rates in the areas traversed by the lines.


Map 1: Least-cost paths (LCPs), railway lines and nodes in 1900.

Source: Own work.


Our results showed that being closer to a station or stop boosted municipal population growth (Figure 1); and that this effect was moderate, but heterogeneous over time and space. In line with international literature on railways and population and NEG predictions, we found the impact of this infrastructure to have been most intense in the 20th century, when the economy and demographics were more dynamic. It was also more pronounced for municipalities traversed by the first wave lines, which linked up the most important nodes in the country. Finally, we noticed that the contribution to growth of having access to the railway network was greatest in large and densely populated municipalities, as well as in industrial areas, valleys and the coast, although it was also relevant in agrarian and high-altitude settings. These results contribute to the literature in several fronts:


Figure 1: Access to the first wave of railways and long-term population growth in Spain, OLS estimates.

Notes: The dependent variable is annual population growth for the period of analysis. The graph shows the marginal effects, and the 95% confidence interval.


First, it has been argued that the arrival of railways preceded demand, and that since their construction depended on imported equipment, Spain’s national industry, and hence its economy, did not reap much benefit from them (Nadal, 1975). However, our findings suggest that accessibility stimulated factor mobility and agglomeration economies throughout the country, even in more agrarian regions and in high-altitude areas. The presence of railways therefore played a key role in fuelling modern growth.

Secondly, there is broad evidence that shows that railways facilitated market integration, which, in turn, led to the spatial concentration of economic activity in the regions that had larger home-market effects and were best endowed (Rosés, 2003). It is also widely accepted that the origin of most migrants were the rural areas in the northern half of the country, those that were near to the migratory basins, and mountainous places. On the other hand, the destinations were the large urban centres and industrial areas (Silvestre, 2005). We complemented these findings by showing that railways boosted population growth in the traversed areas, basically low-construction costs pathways between dynamic nodes. We also found that this effect was also greatest in larger and more densely populated municipalities, as well as in industrializing areas, valleys and coastal regions. Then, and in line with NEG predictions (Martinez-Galarraga et al., 2021) and previous literature (Bogart et al., 2021), the introduction of this new technology reinforced existing hierarchies, thus exacerbating the unequal distribution of the population in space. This was particularly significant from the beginning of the 20th century, when economies of agglomeration became more relevant (Beltrán et al., 2018). Furthermore, considering this evidence and recent insight on the impact of railways in Post-Famine Ireland (Fernihough and Lyons, 2022) and of rural areas in Asturias (Cañal-Fernández and Gómez-Martín, 2022) we believe that, over the long-term, railways may have also contributed to the depopulation of rural Spain.

Lastly, this paper also contributes to a growing international literature on the relationship between railways and growth. Although evidence broadly indicates that railways were pivotal in population change, most of these studies analysed cities, urban areas or large territorial units, while they only provided rough estimates at the national level (Donaldson, 2018; Banerjee et al., 2020; Fenske et al., 2021). There are few that use disaggregated spatial data to analyse both rural and urban population growth but focused on rapidly industrializing and densely populated territories (Berger, 2019; Büchel and Kyburz, 2020; Bogart et al., 2021; Braun and Franke, 2022). Paired with our findings, and in line with NEG predictions, results suggest that the potential effects of railways are heterogeneous over time and space: they are greatest in favourable contexts, where and when demand is more intense, but can also significantly foster growth in less dynamic settings. Even so, and as observed by Bogart et al. (2021) and Braun and Franke (2022), albeit in a very different context from England, Wales and Württemberg, we have shown that this technology strengthened existing hierarchies, thereby fostering spatial inequality.










Banerjee, A., Duflo, E., and Qian, N. (2020). On the road: Access to transportation infrastructure and economic growth in China. Journal of Development Economics, 145, 102442.

Beltrán Tapia, F. J., Díez-Minguela, A., and Martinez-Galarraga, J. (2018). Tracing the Evolution of Agglomeration Economies: Spain, 1860–1991. The Journal of Economic History, 78(1), 81–117.

Berger, T. (2019). Railroads and Rural Industrialization: evidence from a Historical Policy Experiment. Explorations in Economic History, 74, 101277.

Bogart, D., You, X., Alvarez-Palau, E., Satchell, M., and Shaw-Taylor, L. (2021). Railways, divergence, and structural change in 19th century England and Wales. Journal of Urban

Braun, S. T., and Franke, R. (2022). Railways, Growth, and Industrialization in a Developing German Economy, 1829–1910. The Journal of Economic History, 82(4), 1183–1221.

Büchel, K., and Kyburz, S. (2020). Fast track to growth? Railway access, population growth and local displacement in 19th century Switzerland. Journal of Economic Geography, 1538.

Cañal-Fernández, V., and Gómez-Martín, M. (2022). Y el tren arrolló la Arcadia: Un análisis económico y literario de la influencia del ferrocarril en los núcleos rurales asturianos, 1879-1911. Historia Agraria Revista de Agricultura e Historia Rural.

Donaldson, D. (2018). Railroads of the Raj: Estimating the Impact of Transportation

Fenske, J., Namrata, K., and Jinlin, W. (2021). Railways and cities in India.

Fernihough, A., and Lyons, R. C. (2022). Agglomeration and emigration: The economic impact of railways in post-Famine Ireland (No. 2022–11).

Fujita, M., Krugman, P., and Venables, A. (1999). The spatial economy: Cities, regions, and international trade. MIT press.

Gutierrez, E., Moral-Benito, E., Oto-Peralías, D., and Ramos, R. (2020). Spatial Distribution of Population in Spain: An Anomaly in European Perspective (No. 2028).

Krugman, P. (1991). Increasing Returns and Economic Geography. Journal of Political Economy, 99(3), 483–499.

Lafourcade, M. (2011). New Economic Geography: The Role of Transport Costs. In A Handbook of Transport Economics. Edward Elgar Publishing.

Martinez-Galarraga, J., Paluzie, E., Pons, J., Silvestre, J., and Tirado, D. A. (2021). New economic geography and economic history: a survey of recent contributions through the lens of the Spanish industrialization process. Cliometrica, 15(3), 719–751.

Nadal, J. (1975). El fracaso de la revolución industrial en España, 1814-1913 (Ariel, Ed.).

Rosés, J. R. (2003). Why Isn’t the Whole of Spain Industrialized? New Economic Geography and Early Industrialization, 1797–1910. The Journal of Economic History, 63(4), 995–1022.

Silvestre, J. (2005). Internal migrations in Spain, 1877-1930. European Review of Economic History, 9(2), 233–265.