Fimbrial adhesins allow bacteria to interact with and attach to their environment. The bacteria possibly benefit from these interactions, but all external structures including adhesins also allow bacteria to be identified by other organisms. Thus adhesion molecules might be under multiple forms of selection including selection to constrain functional interactions or evolve novel epitopes to avoid recognition. We address these issues by studying genetic diversity in the Escherichia coli type-1 fimbrial major subunit, fimA. Overall, sequence diversity in fimA is high (pi = 0.07) relative to that in other E. coli genes. High diversity is a function of positive diversifying selection, as detected by d(N)/d(S) ratios higher than 1.0, and amino acid residuces subject to diversifying selection are nonrandomly clustered on the exterior surface of the peptide. In addition, McDonald and Kreitman tests suggest that there has been historical but not current directional selection at fimA between E. coli and Salmonella. Finally, some regions of the fimA peptide appear to be under strong structural constraint within E. coli, particularly the interior regions of the molecule that is involved in subunit to subunit interaction. Recombination also plays a major role contributing to E. coli fimA allelic variation and estimates of recombination (2N(e)c) and mutation (2N(e)mu) are about the same. Recombination may act to separate the diverse evolutionary forces in different regions of the fimA peptide.