Compared to selection on new mutations and standing genetic variation, the role of gene flow in generating adaptive genetic variation has been subject to much debate. Theory predicts that gene flow constrains adaptive evolution via natural selection by homogenizing allele frequencies among populations and introducing migrant alleles that may be locally maladaptive1. However, recent work has revealed that populations can diverge even when high levels of gene flow are present24 and that gene flow may play an underappreciated role in facilitating local adaptation by increasing the amount of genetic variation present for selection to act upon58. Here, we investigate how genetic variation introduced by gene flow contributes to adaptive evolution of complex traits using an emerging eco-evolutionary model system, the Mexican tetra (
Astyanax mexicanus). The ancestral surface form of the Mexican tetra has repeatedly invaded and adapted to cave environments. The Chica cave is unique in that it contains several pool microenvironments inhabited by putative hybrids between surface and cave populations9, providing an opportunity to investigate the dynamics of complex trait evolution and gene flow on a local scale. Here we conduct high-resolution genomic mapping and analysis of eye morphology and pigmentation in fish from multiple pools within Chica cave. We demonstrate that hybridization between cave and surface populations contributes to highly localized variation in behavioral and morphological traits. Analysis of sleep and locomotor behaviors between individual pools within this cave revealed reduced sleep associated with an increase in ancestry derived from cave populations, suggesting pool-specific ecological differences may drive the highly-localized evolution of sleep and locomotor behaviors. Lastly, our analyses uncovered a compelling example of convergent evolution in a core circadian clock gene in multiple independent cavefish lineages and burrowing mammals, indicating a shared genetic mechanism underlying circadian disruption in subterranean vertebrates. Together, our results provide insight into the evolutionary mechanisms that promote adaptive genetic variation and the genetic basis of complex behavioral phenotypes involved in local adaptation.