Although large human populations have been safely immunized against tuberculosis with two live vaccines, Mycobacterium bovis BCG or Mycobacterium microti, the vole bacillus, the molecular basis for the avirulence of these vaccine strains remains unknown. Comparative genomics has identified a series of chromosomal deletions common to both virulent and avirulent species but only a single locus, RD1, that has been deleted from M. bovis BCG and M. microti. Restoration of RD1, by gene knock-in, resulted in a marked change in colonial morphology towards that of virulent tubercle bacilli. Three RD1-encoded proteins were localized in the cell wall, and two of them, the immunodominant T-cell antigens ESAT-6 and CFP-10, were also found in culture supernatants. The BCG::RD1 and M. microti::RD1 knock-ins grew more vigorously than controls in immunodeficient mice, inducing extensive splenomegaly and granuloma formation. Increased persistence and partial reversal of attenuation were observed when immunocompetent mice were infected with the BCG::RD1 knock-in, whereas BCG controls were cleared. Knocking-in five other RD loci did not affect the virulence of BCG. This study describes a genetic lesion that contributes to safety and opens new avenues for vaccine development.