Understanding the molecular basis of repeated evolved phenotypes can yield key insights into the evolutionary process. Quantifying the amount of gene flow between populations is especially important in interpreting mechanisms of repeated phenotypic evolution, and genomic analyses have revealed that admixture is more common between diverging lineages than previously thought. In this study, we resequenced and analyzed nearly 50 whole genomes of the Mexican tetra from three blind cave populations, two surface populations, and outgroup samples. We confirmed that cave populations are polyphyletic and two
Astyanax mexicanuslineages are present in our dataset. The two lineages likely diverged 257k generations ago, which, assuming 1 generation per year, is substantially younger than previous mitochondrial estimates of 5-7mya. Divergence of cave populations from their phylogenetically closest surface population likely occurred between 161k - 191k generations ago. The favored demographic model for most population pairs accounts for divergence with secondary contact and heterogeneous gene flow across the genome, and we rigorously identified abundant gene flow between cave and surface fish, between caves, and between separate lineages of cave and surface fish. Therefore, the evolution of cave-related traits occurred more rapidly than previously thought, and trogolomorphic traits are maintained despite substantial gene flow with surface populations. After incorporating these new demographic estimates, our models support that selection may drive the evolution of cave-derived traits, as opposed to the classic hypothesis of disuse and drift. Finally, we show that a key QTL is enriched for genomic regions with very low divergence between caves, suggesting that regions important for cave phenotypes may be transferred between caves via gene flow. In sum, our study shows that shared evolutionary history via gene flow must be considered in studies of independent, repeated trait evolution.