The distribution of suitable habitat influences natal and breeding dispersal at small spatial scales, resulting in strong microgeographic genetic structure. Although environmental variation can promote interpopulation differences in dispersal behavior and local spatial patterns, the effects of distinct ecological conditions on within‐species variation in dispersal strategies and in fine‐scale genetic structure remain poorly understood. We studied local dispersal and fine‐scale genetic structure in the thorn‐tailed rayadito (Aphrastura spinicauda), a South American bird that breeds along a wide latitudinal gradient. We combine capture‐mark‐recapture data from eight breeding seasons and molecular genetics to compare two peripheral populations with contrasting environments in Chile: Navarino Island, a continuous and low density habitat, and Fray Jorge National Park, a fragmented, densely populated and more stressful environment. Natal dispersal showed no sex bias in Navarino but was female‐biased in the more dense population in Fray Jorge. In the latter, male movements were restricted, and some birds seemed to skip breeding in their first year, suggesting habitat saturation. Breeding dispersal was limited in both populations, with males being more philopatric than females. Spatial genetic autocorrelation analyzes using 13 polymorphic microsatellite loci confirmed the observed dispersal patterns: a fine‐scale genetic structure was only detectable for males in Fray Jorge for distances up to 450 m. Furthermore, two‐dimensional autocorrelation analyzes and estimates of genetic relatedness indicated that related males tended to be spatially clustered in this population. Our study shows evidence for context‐dependent variation in natal dispersal and corresponding local genetic structure in peripheral populations of this bird. It seems likely that the costs of dispersal are higher in the fragmented and higher density environment in Fray Jorge, particularly for males. The observed differences in microgeographic genetic structure for rayaditos might reflect the genetic consequences of population‐specific responses to contrasting environmental pressures near the range limits of its distribution.