The fim switch in Escherichia coli is the mechanism by which the fim gene cluster, encoding Type I Pili,[1] is transcriptionally controlled.
These pili are virulence factors involved in adhesion, especially important in uropathogenic Escherichia coli. The gene undergoes phase variation mediated via two recombinases and is a model example of site specific inversion.