Genetic differentiation and patterns of variability in the endangered Iberian endemic,Aphanius iberus, were analyzed by allozyme electrophoresis as a valuable database for conservation purposes. Genetic variability values expressed as heterozygosity (H = 0.015–0.097) were close to the values found in other members of Cyprinodontidae (H = 0.012–0.123). Polymorphism values (P = 0.125–0.542) were higher than reported in the literature (P = 0.036–0.150) for Cyprinodontidae. Significant correlation existed between salinity values and genetic variability expressed as heterozygosity (r = − 0.76, p < 0.01) and polymorphism (r = − 0.60, p = 0.04). Low genetic variability values (H = 0.024–0.055, P = 0.125–0.292) were exhibited by populations which inhabit salty lagoons. The highest values were found in populations occurring in marshes and irrigation channels (H = 0.051–0.097, P = 0.250–0.542). Associations among genetic, geographic and ecological parameters were tested using a Mantel test indicated that most of the genetic distances were explained by geographic distances but not by ecological factors, suggesting that isolation by distance could be the main factor explaining the differentiation between sites. According to the genetic distances obtained, two mainA. iberus groups were discernible: the Atlantic and Mediterranean. Genetic distances between both groups (DRogers = 0.179–0.261) were higher than values between recognized species of other cyprinodontids (DRogers = 0.11–0.27). On the basis of genetic distances we have dated the fragmentation of both populations to the Upper Miocene-Pliocene when most of the Mediterranean sea dried up. Subsequently, gene flow between Mediterranean and Atlantic populations was interrupted. The results of our genetic analyses suggested the existence of five operational conservation units (OCUs) forA. iberus. These units are defined as a continuous area limited by geographical boundaries, and inhabited by one or more populations sharing the same genetic pattern.