jabbrv-ltwa-all.ldf jabbrv-ltwa-en.ldf Adaptation to different environments in geographically separated populations is key for allopatric speciation. Most research has focused on the effects of geographical isolation and abiotic factors, but disjunct populations frequently co-occur with different pools species, favouring divergent adaptation and speciation. We show the importance of plant neighbourhood, compared to geographic and environmental factors, in the allopatric speciation across the Iberian Peninsula of two closely related plants, Carex elata and Carex reuteriana. Using regularized generalized linear models, we identified the key variables explaining distribution patterns. We also examined the relationships between inter-population genetic distances, using genomic data (genotyping-by-sequencing), and biotic, abiotic and geographic factors to understand the drivers of lineage splitting. Plant neighbourhood emerged as a stronger predictor of allopatric distributions than abiotic or geographic factors. Additionally, inter-population genetic distances were significantly associated with all the factors studied, albeit with varying degrees of influence. Notably, plant neighbourhood had the largest effect in C. elata, which showed the greatest population differentiation. These findings suggest that the biotic and microenvironmental factors influencing divergent plant neighbourhoods have significantly contributed to the differentiation of these taxa, providing new insights into the evolutionary processes shaping the origin and distribution of species.