The gene cluster of the CS18 (PCFO20) fimbriae of human enterotoxigenic Escherichia coli (ETEC) was found to include seven genes (fotA to fotG) that are similar to each of the seven structural and export proteins of the 987P fimbriae. However, no analogous gene to the fasH regulatory gene, which is located at the 3' end of the 987P gene cluster and encodes an AraC-like activator of transcription, could be detected. Surprisingly, two novel genes (fotS and fotT) encoding proteins similar to the site-specific recombinases of the type 1 fimbriae (FimB and FimE) were identified at the 5' end of the fot gene cluster. These genes were shown to be required for the catalysis of a 312 bp-inversion just upstream of fotA. The inversion determines CS18 fimbrial phase variation. FotS participates in inverting the 312 bp-segment in both the ON and OFF orientation, whereas FotT has a bias for the OFF oriented recombination. Similar regulators of fimbriation by phase variation were described in uropathogenic and commensal Enterobacteriaceae. In contrast, only AraC-like transcriptional activators were previously described as regulators of the intestinal colonization factors of human ETEC isolates. Thus, the CS18 and 987P gene clusters encode similar components for fimbrial biogenesis but different types of regulators for fimbriation. The combination of blocks of genes encoding similar structural products but different regulatory proteins underlines how modular DNA rearrangements can evolve by serving pathogen diversification. Acquisition of a phase variation module to regulate fimbrial genes is proposed to be beneficial for the adaptation and transmission of pathogens.