Many pathogens colonize different anatomical sites, but the selective pressures contributing to survival in the diverse niches are poorly understood. Group A Streptococcus (GAS) is a human-adapted bacterium that causes a range of infections. Much effort has been expended to dissect the molecular basis of invasive (sterile-site) infections, but little is known about the genomes of strains causing pharyngitis (streptococcal "sore throat"). Additionally, there is essentially nothing known about the genetic relationships between populations of invasive and pharyngitis strains. In particular, it is unclear if invasive strains represent a distinct genetic subpopulation of strains that cause pharyngitis. We compared the genomes of 86 serotype M3 GAS pharyngitis strains with those of 215 invasive M3 strains from the same geographical location. The pharyngitis and invasive groups were highly related to each other and had virtually identical phylogenetic structures, indicating they belong to the same genetic pool. Despite the overall high degree of genetic similarity, we discovered that strains from different host environments (i.e., throat, normally sterile sites) have distinct patterns of diversifying selection at the nucleotide level. In particular, the pattern of polymorphisms in the hyaluronic acid capsule synthesis operon was especially different between the two strain populations. This finding was mirrored by data obtained from full-genome analysis of strains sequentially cultured from nonhuman primates. Our results answer the long-standing question of the genetic relationship between GAS pharyngitis and invasive strains. The data provide previously undescribed information about the evolutionary history of pathogenic microbes that cause disease in different anatomical sites.