AIMS:
Legumes have great economic importance in global agriculture as they are a major source of protein for humans, and their ability to fixate nitrogen through endosymbiosis is unique. Nevertheless, they have not been studied as extensively as other crops. In this sense, the barrel medic (Medicago truncatula) is an invaluable model for studying local adaptation in legumes. Previous studies on M.truncatula have identified loci potentially responsible for adaptation to climatic variables. However, environmental characteristics other than climate can pose selective pressures on adaptive genomic variation of barrel medic. In the present study, we used Latent-Factor-Mixed-Models (LFMM) and Moran spectral outlier detection/ randomization (MSOD-MSR) to identify candidate loci for adaptation to 10 environmental variables (climatic, soil and atmospheric) among 43,515 SNPs from 202 accessions of the model legume Medicago truncatula. We found that most candidate loci were associated with soil variables, highlighting the importance of soil environment as driver of local adaptation. Candidate SNPs associated with drought and soil salinity tagged genes with known functions in response to abiotic and biotic stress, while candidates associated with atmospheric and soil nitrogen tagged genes involved in different stages of the legume-rhizobia symbiosis. Candidate SNPs identified by both LFMM and MSOD-MSR explained up to 56% of variance in phenotypic traits such as growth and flowering time, which supports their adaptive relevance in M.truncatula. Our findings highlight the importance of variables other than climate in promoting local adaptation in the system, and suggest that global climate change and anthropogenic disruption of the nitrogen cycle could disrupt local adaptation.