Site-specific DNA invertible elements often control the production of bacterial surface proteins that are subject to phase variation (ON/OFF switching). Inversion of the DNA element occurs as a result of the reciprocal exchange of DNA catalysed by a specialized enzyme (recombinase) that acts at specific sites. By continually switching the orientation of the invertible element in the chromosome, and consequently the production of the variable protein(s), the cell population remains continually responsive to environmental change such as immunological challenge. In addition to phase-variable surface proteins, Mycoplasma pulmonis has a family of phase-variable restriction-modification enzymes. We report here that a single recombinase in M. pulmonis, HvsR, catalyses independent DNA inversions at non-homologous loci, causing variations in surface lipoproteins and in the DNA recognition sequence specificity of restriction enzymes. Thus, HvsR is a site-specific DNA recombinase with dual substrate specificity.