The processes that restrict gene flow between populations are fundamental to speciation. Here, we develop a simple framework for studying whether divergence in morphology, climatic niche, time and space contribute to reduced gene flow among populations and species. We apply this framework to a model system involving a clade of spiny lizards (Sceloporus) occurring mostly in northeastern Mexico, which show striking variation in morphology and habitat among closely related species and populations. We developed a new time‐calibrated phylogeny for the group using RADseq data from 152 individuals. This phylogeny identified 12 putative species‐level clades, including at least two undescribed species. We then estimated levels of gene flow among 21 geographically adjacent pairs of species and populations. We also estimated divergence in morphological and climatic niche variables among these same pairs, along with divergence times and geographic distances. Using Bayesian generalised linear models, we found that gene flow between pairs of lineages is negatively related to divergence time and morphological divergence among them (which are uncorrelated), and not to geographic distance or climatic divergence. The framework used here can be applied to study speciation in many other organisms having genomic data but lacking direct data on reproductive isolation. We also found several other intriguing patterns in this system, including the parallel evolution of a strikingly similar montane blue–red morph from more dull‐coloured desert ancestors within two different, nonsister species.