Restriction and modification (R-M) systems are generally thought to protect bacteria from invasion by foreign DNA. This paper proposes the existence of an alternative role for the phase-variable R-M systems encoded by the hsd loci of Mycoplasma pulmonis. Populations of M. pulmonis cells that arose during growth in different environments were compared with respect to R-M activity and surface antigen production. When M. pulmonis strain X1048 was propagated in laboratory culture medium, >95% of colony-forming units (cfu) lacked R-M activity and produced the variable surface protein VsaA. Mycoplasmas isolated from the nose of experimentally infected rats also lacked R-M activity and produced VsaA. In contrast, the cell population of mycoplasmas isolated from the lower respiratory tract of the infected rats was more complex. The most dramatic results were obtained for mycoplasmas isolated from the trachea. At 14 days postinfection, 38% of mycoplasma isolates produced a Vsa protein other than VsaA, and 34% of isolates had active restriction systems. These data suggest that differences in selection pressures in animal tissues affect the surface proteins and the R-M activity of the mycoplasmal cell population. We propose that variations in the production of R-M activity and cell surface proteins are important for the survival of the mycoplasma within the host.