We have taken a phylogeographic approach to investigate the demographic and evolutionary processes that have shaped the geographic patterns of genetic diversity for a sample of isolates of the cosmopolitan thermophilic cyanobacterial Mastigocladus laminosus morphotype collected from throughout most of its range. Although M. laminosus is found in thermal areas throughout the world, our observation that populations are typically genetically differentiated on local geographic scales suggests the existence of dispersal barriers, a conclusion corroborated by evidence for genetic isolation by distance. Genealogies inferred using nitrogen metabolism gene sequence data suggest that a significant amount of the extant global diversity of M. laminosus can be traced back to a common ancestor associated with the western North American hot spot currently located below Yellowstone National Park. Estimated intragenic recombination rates are comparable to those of pathogenic bacteria known for their capacity to exchange DNA, indicating that genetic exchange has played an important role in generating novel variation during M. laminosus diversification. Selection has constrained protein changes at loci involved in the assimilation of both dinitrogen and nitrate, suggesting the historic use of both nitrogen sources in this heterocystous cyanobacterium. Lineage-specific differences in thermal performance were also observed.