Abstract Background The underlying mechanisms and processes that prompt the colonisation of extreme environments, such as caves, constitute major research themes of evolutionary biology and biospeleology. The special adaptations required to survive in subterranean environments (low food availability, hypoxic waters, permanent darkness), and the geographical isolation of caves, nominate cave biodiversity as ideal subjects to answer long-standing questions concerning the interplay amongst adaptation, biogeography, and evolution. The present project aims to examine the phylogeographic patterns exhibited by two sympatric species of surface and cave-dwelling peracarid crustaceans (Asellus aquaticus and Niphargus hrabei), and in doing so elucidate the possible roles of isolation and exaptation in the colonisation and successful adaptation to the cave environment. Results Specimens of both species were sampled from freshwater hypogean (cave) and epigean (surface) habitats in Hungary, and additional data from neighbouring countries were sourced from Genbank. Sequencing of mitochondrial and nuclear loci revealed, through haplotype network reconstruction (TCS) and phylogenetic inference, the genetic structure, phylogeographic patterns, and divergence-time estimates of A. aquaticus and N. hrabei surface and cave populations. Contrasting phylogeographic patterns were found between species, with A. aquaticus showing strong genetic differentiation between cave and surface populations and N. hrabei lacking any evidence of genetic structure mediated by the cave environment. Furthermore, N. hrabei populations show very low levels of genetic differentiation throughout their range, which suggests the possibility of recent expansion events over the last few thousand years. Conclusions Isolation by cave environment, rather than distance, is likely to drive the genetic structuring observed between immediately adjacent cave and surface populations of A. aquaticus, a predominantly surface species with only moderate exaptations to subterranean life. For N. hrabei, in which populations exhibit a fully ‘cave-adapted’ (troglomorphic) phenotype, the lack of genetic structure suggests that subterranean environments do not pose a dispersal barrier for this surface-cave species.