Bacterial biofilms are communities of bacteria that are enclosed in an extracellular matrix. Within a biofilm the bacteria are protected from antimicrobials, environmental stresses, and immune responses from the host. Biofilms are often believed to have a highly developed organization that is derived from differential regulation of the genes that direct the synthesis of the extracellular matrix and the attachment to surfaces. The mycoplasmas have the smallest of the prokaryotic genomes and apparently lack complex gene-regulatory systems. We examined biofilm formation by Mycoplasma pulmonis and found it to be dependent on the length of the tandem repeat region of the variable surface antigen (Vsa) protein. Mycoplasmas that produced a short Vsa protein with few tandem repeats formed biofilms that attached to polystyrene and glass. Mycoplasmas that produced a long Vsa protein with many tandem repeats formed microcolonies that floated freely in the medium. The biofilms and the microcolonies contained an extracellular matrix which contained Vsa protein, lipid, DNA, and saccharide. As variation in the number of Vsa tandem repeats occurs by slipped-strand mispairing, the ability of the mycoplasmas to form a biofilm switches stochastically. Copyright © 2007, American Society for Microbiology. All Rights Reserved.