Legumes were among the first plant species to be domesticated, and accompanied cereals in expansion of agriculture from the Fertile Crescent into diverse environments across the Mediterranean basin, Europe, Central Asia, and the Indian subcontinent. Although several recent studies have outlined the molecular basis for domestication and eco-geographic adaptation in the two main cereals from this region, wheat and barley, similar questions remain largely unexplored in their legume counterparts. Here we identify two major loci controlling differences in photoperiod response between wild and domesticated pea, and show that one of these, high response to photoperiod (HR), is an ortholog of early flowering 3 (ELF3), a gene involved in circadian clock function. We found that a significant proportion of flowering time variation in global pea germplasm is controlled by HR, with a single, widespread functional variant conferring altered circadian rhythms and the reduced photoperiod response associated with the spring habit. We also present evidence that ELF3 has a similar role in lentil, another major legume crop, with a distinct functional variant contributing to reduced photoperiod response in cultivars widely deployed in short-season environments. Our results identify the factor likely to have permitted the successful prehistoric expansion of legume cultivation to Northern Europe, and define a conserved genetic basis for major adaptive changes in flowering phenology and growth habit in an important crop group.