Leptospira spp. offer many advantages as model bacteria for the study of spirochaetes. However, homologous recombination between introduced DNA and the corresponding chromosomal loci has never been demonstrated. A unique feature of spirochaetes is the presence of endoflagella between the outer membrane sheath and the cell cylinder. We chose the flaB flagellin gene, constituting the flagellar core, as a target for gene inactivation in the saprophyte Leptospira biflexa. The amino acid sequence of the FlaB protein of L. biflexa was most similar to those of spirochaetes Brachyspira hyodysenteriae (agent of swine dysentery), Leptospira interrogans (agent of leptospirosis) and Treponema pallidum (agent of syphilis). A suicide vector containing the L. biflexa flaB gene disrupted by a kanamycin marker was UV irradiated or alkali denatured before electroporation. This methodology allowed the selection of many kanamycin-resistant colonies resulting from single and double cross-over events at the flaB locus. The double recombinant mutants are non-motile, as visualized in both liquid and semi-solid media. In addition, a flaB mutant selected for further analysis was shown to be deficient in endoflagella by electron microscopy. However, most of the transformants had resulted from a single homologous recombination event, giving rise to the integration of the suicide vector. We evaluated the effect of the sacB and rpsL genes in L. biflexa as potential counterselectable markers for allelic exchange, and then used the rpsL system for the positive selection of flaB double recombinants in a streptomycin-resistant strain. Like the flaB mutant studied above, the Strr double cross-over mutant was non-motile and deficient in endoflagella. Our results demonstrate that FlaB is involved in flagella assembly and motility. They also show the feasibility of performing allelic replacement in Leptospira spp. by homologous recombination.