The expression of type 1 fimbriae in Escherichia coli is phase variable, with cells switching between fimbriate (ON) and afimbriate (OFF) phases. The phase variation is dependent on the orientation of a 314 bp DNA element (the switch) that undergoes DNA inversion. DNA inversion requires either fimB or fimE, site-specific recombinases that differ in both specificity and activity. Whereas fimB promotes recombination with little orientational bias, fimE promotes recombination in the ON-to-OFF direction exclusively. In wild-type cells, fimE activity predominates and, hence, most bacteria are afimbriate. Here, it is shown that fimE specificity is caused by two different, but complementary, mechanisms. First, FimE shows a strong preference for the switch in the ON orientation as a substrate for recombination. Differences in the nucleotide sequence of the recombinase binding sites is a key factor in determining FimE specificity, although one or more additional cis-active sites that flank the fim switch also appear to be involved. Secondly, the orientation of the switch controls fimE in cis, most probably to control recombinase expression.