Mountain birch, Betula pubescens ssp. tortuosa, forms the treeline in northern Sweden. A recent shift in the range of the species associated with an elevation of the treeline is commonly attributed to climate warming. Using microsatellite markers, we explored the genetic structure of populations along an altitudinal gradient close to the treeline. Low genetic differentiation was found between populations, whereas high genetic diversity was maintained within populations. High level of gene flow compensated for possible losses of genetic diversity at higher elevations and dissipated the founding effect of newly established populations above the treeline. Spatial autocorrelation analysis showed low spatial genetic structure within populations because of extensive gene flow. At the treeline, significant genetic structure within the juvenile age class at small distances did not persist in the adult age class, indicating recent expansion of young recruits due to the warming of the climate. Finally, seedling performance above the treeline was positively correlated with parameters related to temperature. These data confirm the high migration potential of the species in response to fluctuating environmental conditions and indicate that it is now invading higher altitudes due to the recent warming of the climate.