Gene flow among incipient species can act as a creative or destructive force in the speciation process, generating variation on which natural selection can act while, potentially, undermining population divergence. The flowering plant genus Carex exhibits a rapid and relatively recent radiation with many species limits still unclear. This is the case with the Iberian Peninsula (Spain and Portugal)-endemic C. lucennoiberica, which lay unrecognized within Carex furva until its recent description as a new species. In this study, we test how these species were impacted by interspecific gene flow during speciation. We sampled the full range of distribution of C. furva (15 individuals sampled) and C. lucennoiberica (88 individuals), sequenced two cpDNA regions (atpI-atpH, psbA-trnH) and performed genomic sequencing of 45,100 SNPs using restriction site-associated DNA sequencing (RAD-seq). We utilized a set of partitioned D-statistic tests and demographic analyses to study the degree and direction of introgression. Additionally, we modelled species distributions to reconstruct changes in range distribution during glacial and interglacial periods. Plastid, nuclear and morphological data strongly support divergence between species with subsequent gene flow. Combined with species distribution modelling, these data support a scenario of allopatry leading to species divergence, followed by secondary contact and gene flow due to long-distance dispersal and/or range expansions and contractions in response to Quaternary glacial cycles. We conclude that this is a case of allopatric speciation despite historical secondary contacts, which could have temporally influenced the speciation process, contributing to the knowledge of forces that are driving or counteracting speciation.