Microgeographic adaptation occurs when populations evolve divergent fitness advantages across the spatial scales at which focal organisms regularly disperse. Although an increasing number of studies find evidence for microgeographic adaptation, the underlying causes often remain unknown. Adaptive divergence requires some combination of limited gene flow and strong divergent natural selection among populations. In this study, we estimated the relative influence of selection, gene flow, and the spatial arrangement of populations in shaping patterns of adaptive divergence in natural populations of the spotted salamander (Ambystoma maculatum). Within the study region, A. maculatum co-occur with the predatory marbled salamander (Ambystoma opacum) in some ponds, and past studies have established a link between predation risk and adaptive trait variation in A. maculatum. Using 14 microsatellite loci, we found a significant pattern of genetic divergence among A. maculatum populations corresponding to levels of A. opacum predation risk. Additionally, A. maculatum foraging rate was strongly associated with predation risk, genetic divergence, and the spatial relationship of ponds on the landscape. Our results indicate the sorting of adaptive genotypes by selection regime and strongly suggest that substantial selective barriers operate against gene flow. This outcome suggests that microgeographic adaptation in A. maculatum is possible because strong antagonistic selection quickly eliminates maladapted phenotypes despite ongoing and substantial immigration. Increasing evidence for microgeographic adaptation suggests a strong role for selective barriers in counteracting the homogenizing influence of gene flow.