An important question for the conservation of species dwelling in fragmented habitats is whether changes to the intervening landscape create a barrier to gene flow. Here, we make use of the spatial distribution of the granite outcrop-dwelling lizard, Ctenophorus ornatus, to compare inferred levels of gene flow between outcrops in a nature reserve with that between outcrops in the adjacent agricultural land. Genetic variation, relatedness and subdivision were compared within groups of individuals from different outcrops similar in size and distance apart at each site. In the agricultural land, we found significantly lower genetic variation within outcrops and greater genetic differentiation between outcrops than in the reserve. Further, the rate at which genetic divergence between outcrops increased over geographical distance was significantly greater in the agricultural land than in the reserve. We also found that individuals were more closely related within outcrops but more distantly related between outcrops in the cleared land. These effects occur over a small spatial scale with an average distance between outcrops of less than five kilometres. Thus, even though land clearing around the outcrops leaves outcrop size unchanged, it restricts gene flow, reducing genetic variation and increasing population structure, with potentially negative consequences for the long-term persistence of the lizards on these outcrops.