Abstract While the impact of environmental forcing on recruitment variability in marine populations remains largely elusive, studies spanning large spatial areas and many stocks are able to identify patterns common to different regions and species. In this study, we investigate the effects of the environment on the residuals of a Ricker stock–recruitment (SR) model, used as a proxy of prerecruits' survival, of 18 assessed stocks in the Baltic and North Seas. A probabilistic principal components (PCs) analysis permits the identification of groups of stocks with shared variability in the prerecruits' survival, most notably a group of pelagics in the Baltic Sea and a group composed of gadoids and herring in the North Sea. The first two PCs generally grouped the stocks according to their localizations: the North Sea, the Kattegat–Western Baltic, and the Baltic Sea. This suggests the importance of the local environmental variability on the recruitment strength. Hence, the prerecruits' survival variability is studied according to geographically disaggregated and potentially impacting abiotic or biotic variables. Time series (1990–2009) of nine environmental variables consistent with the spawning locations and season for each stock were extracted from a physical–biogeochemical model to evaluate their ability to explain the survival of prerecruits. Environmental variables explained >70% of the survival variability for eight stocks. The variables water current, salinity, temperature, and biomass of other fish stocks are regularly significant in the models. This study shows the importance of the local environment on the dynamics of SR. The results provide evidence of the necessity of including environmental variables in stock assessment for a realistic and efficient management of fisheries.