By cloning and sequencing the flagellin gene of Borrelia hermsii and comparing this sequence with that of the corresponding gene from B. burgdorferi, I identified a central region within the two genes which showed a reduced level of sequence similarity. Oligonucleotide sequences selected from this region produced species-specific amplimers when used in polymerase chain reaction experiments. Thus, primers derived from the B. burgdorferi sequence amplified a 276-bp fragment from 22 strains of B. burgdorferi of diverse geographic origin but not from 5 strains of B. hermsii, 5 other Borrelia species, 16 Treponema, Leptospira, and Spirochaeta species, or representatives of 10 other bacterial genera. However, when the amplified fragments were tested for hybridization with an oligonucleotide probe derived from the nonhomologous region, seven strains from either Germany or Switzerland did not hybridize. Cloning and sequencing of the amplified fragments from these strains revealed that the 22 strains of B. burgdorferi tested could be divided into three groups based on the nucleic acid sequence of the central region of the flagellin gene. With this information, oligonucleotide probes that hybridized to the amplified fragments and were able to differentiate the three groups of B. burgdorferi were designed. The corresponding primers, derived from the B. hermsii gene sequence, were tested for their ability to amplify DNA from this collection of strains. Although no amplification was obtained with representatives of the three groups of B. burgdorferi or various Treponema, Leptospira, and Spirochaeta species, amplification was obtained with the five other Borrelia species (B. parkeri, B. turicatae, B. crocidurae, B. anserina, and B. coriaceae) in addition to the five strains of B. hermsii. Sequencing of the amplified fragments from one strain of B. hermsii as well as B. parkeri and B. turicatae allowed the design of oligonucleotide probes that were able to differentiate the three species of North American relapsing fever spirochetes into two separate groups. These studies suggest that there is sufficient diversity within the flagellin gene sequences of closely related Borrelia species to differentiate them into groups and to pursue taxonomic studies both within and between species.