The political unification of Italy in 1861 led to the establishment of a single market, by removing the trade barriers across the pre-existing states, with a single currency. Market integration was the economic outcome of this process. At the same time, the Kingdom of Italy started a large infrastructure project to spread railways, which were largely confined in Northern Italy, all over the country. Using tools from spatial econometrics, we find that railways played a positive effect on productivity, but this effect was stronger in the areas in which railways were already built. Moreover, railways helped industrial firms to locate closer to water sources and gain access from there to the overall market. This effect is in line with New Economic Geography according to which infrastructure lead to a widening of territorial disparities.