Landscape features shape patterns of gene flow among populations, ultimately determining where taxa lay along the continuum between panmixia to complete reproductive isolation. Gene flow can be restricted leading to population differentiation in two non-exclusive ways: "physical isolation", in which geographic distance in combination with the landscape features restricts movement of individuals promoting genetic drift, and "ecological isolation", in which adaptive mechanisms constrain gene flow between different environments via divergent natural selection. In central Iberia, two fire salamander subspecies occur in parapatry across elevation gradients along the Iberian Central System mountains, while in adjacent Mountains of Toledo Region only one of them occurs. By integrating population and landscape genetic analyses, we show a ubiquitous role of physical isolation between and within mountain ranges, with unsuitable landscapes increasing differentiation between populations. However, across the Iberian Central System, we found strong support for a significant contribution of ecological isolation, with low genetic differentiation in environmentally homogeneous areas, but high differentiation across sharp transitions in precipitation seasonality. These patterns are consistent with a significant contribution of ecological isolation in restricting gene flow among subspecies. Overall, our results suggest that ecological divergence contributes to reduce genetic admixture, creating an opportunity for lineages to follow distinct evolutionary trajectories.