Local returns to scale in the labor market have been notoriously difficult to disentangle from increasing returns in the product market and from the spatial sorting of workers and firms as a source for regional variation in productivity. In this paper we use the introduction of high-speed rail as a natural experiment in order to isolate the impact of labor market size on urban wages from product market and sorting effects. The key idea underlying our identification approach is that high-speed trains reduce commuting times between regions and thereby effectively increase the size of local labor markets without directly affecting product markets. The exact timing of the opening of high-speed rail connections can be regarded as exogenous, as a high-speed rail network is very expensive to build, requires a long planning phase and is mainly the result of political decisions. Furthermore, especially in the second wave of network expansion, several small towns were connected to the high-speed rail network simply because of their location between major metropolitan hubs and in this way got 'lucky' compared to neighboring towns. Drawing on a large and novel panel data set on the introduction of ICE-stations and on connection times between regions in Germany, as well as on a full sample of workers' employment histories, we examine the effect of high-speed trains on commuting behavior and wages. Using case studies, a pooled event study, and gravity equations with instrumental variables and propensity score matching we show that high-speed trains reduce traveling times by sixteen percent on average and significantly raise the number of commuters between local labor markets. We find that commuters incur wage gains of about three percent after the opening of an ICE-station, indicating that improved access to larger urban labor markets is associated with productivity gains for workers living in peripheral regions. In sum, our results suggest that between one third and half of overall agglomeration externalities are rooted in increasing returns to scale in local labor markets.