Streptococcus pneumoniae (the pneumococcus) is the world’s foremost bacterial pathogen in both morbidity and mortality. Switching between phenotypic forms (or ‘phases’) that favour asymptomatic carriage or invasive disease was first reported in 1933. Here, we show that the underlying mechanism for such phase variation consists of genetic rearrangements in a Type I restriction-modification system (SpnD39III). The rearrangements generate six alternative specificities with distinct methylation patterns, as defined by single-molecule, real-time (SMRT) methylomics. The SpnD39III variants have distinct gene expression profiles. We demonstrate distinct virulence in experimental infection and in vivo selection for switching between SpnD39III variants. SpnD39III is ubiquitous in pneumococci, indicating an essential role in its biology. Future studies must recognize the potential for switching between these heretofore undetectable, differentiated pneumococcal subpopulations in vitro and in vivo. Similar systems exist in other bacterial genera, indicating the potential for broad exploitation of epigenetic gene regulation.