Abstract
Gene flow between diverging species can reshuffle genomic variation and greatly influence the speciation process, sometimes reinforcing, sometimes eroding species boundaries. However, the effect of ecological and historical processes on the patterns of introgression remains poorly understood. Here, we focus on the evolutionary history of Heliconius besckei, a geographically restricted butterfly endemic to the Brazilian Atlantic Forest, together with the mimetic H. melpomene nanna, the sympatric non-mimetic H. ethilla narcaea, and its closely related H. numata robigus. Using whole-genome sequencing, genome-wide tests of introgression, demographic modelling and palaeoclimatic species distribution models, we tested the extent and timing of interspecific gene flow in relation to mimicry, ecological context, and changes in geographic overlap. Despite strong genomic differentiation among the four focal Heliconius species, we detected widespread signatures of interspecific gene flow, greatly influenced by geographical overlap. Demographic models including post-divergence gene flow were better supported than strict-isolation models. In addition, genome-wide introgression analyses showed more numerous and larger candidate introgressed regions between H. besckei and H. ethilla narcaea, consistent with recurrent opportunities for exchange between these currently sympatric species. Species distribution models further recovered repeated expansions of suitable habitat for H. besckei during cold periods, providing a potential geographic context for secondary contact within the Atlantic Forest. Together, our results reveal recurrent gene flow occurring under different temporal, geographic, and potentially selective contexts, and show that the evolutionary history of a geographically restricted lineage can be shaped by repeated genetic exchange while substantial species differentiation is maintained.