Mycoplasma hyopneumoniae is the etiological agent of enzootic pneumonia in swine. Various reports indicate that different strains are circulating in the swine population. We investigated the variety of M. hyopneumoniae strains by a newly developed genetic typing method based on the polyserine repeat motif of the LppS homolog P146. PCR amplification using M. hyopneumoniae specific, conserved primers flanking the region encoding the repeat motif, followed by sequencing and cluster analysis was carried out. The study included strains isolated from different geographic regions as well as lysates from lung swabs from a series of pig farms in Switzerland. High diversity of M. hyopneumoniae was observed but farms being in close geographic or operative contact generally seemed to be affected by the same strains. Moreover, analysis of multiple samples from single pig farms indicated that these harbored the same, farm-specific strain. The results indicate that multiple strains of M. hyopneumoniae are found in the swine population but that specific strains or clones are responsible for local outbreaks. The method presented is a highly reproducible epidemiologic tool allowing direct typing of M. hyopneumoniae from clinical material without prior isolation and cultivation of strains.