Linking spatial variation in environmental factors to variation in demographic rates is essential for a mechanistic understanding of the dynamics of populations. However, we still know relatively little about such links, partly because feedbacks via intraspecific density make them difficult to observe in natural populations. We conducted a detailed field study and investigated simultaneous effects of environmental factors and the intraspecific density of individuals on the demography of the herb Lathyrus vernus. In regression models of vital rates we identified effects associated with spring shade on survival and growth, while density was negatively correlated with these vital rates. Density was also negatively correlated with average individual size in the study plots, which is consistent with self-thinning. In addition, average plant sizes were larger than predicted by density in plots that were less shaded by the tree canopy, indicating an environmentally determined carrying capacity. A size-structured integral projection model based on the vital rate regressions revealed that the identified effects of shade and density were strong enough to produce differences in stable population sizes similar to those observed in the field. The results illustrate how the local environment can determine dynamics of populations and that intraspecific density may have to be more carefully considered in studies of plant demography and population viability analyses of threatened species. We conclude that demographic approaches incorporating information about both density and key environmental factors are powerful tools for understanding the processes that interact to determine population dynamics and abundances.