The molecular genetic basis of high-frequency serotype 3 capsule phase variation in Streptococcus pneumoniae (the pneumococcus) was investigated. Pneumococci were grown in sorbarod biofilms at 34 degrees C to mimic nasopharyngeal carriage. Different type 3 pneumococci commonly associated with invasive disease generated apparently random tandem duplications of 11-239 bp segments within the cap3A gene of the type 3 capsule locus. These duplications alone were found to be responsible for high-frequency capsule phase variation, in which (phase off) acapsular variants possessed duplications within cap3A, and (phase on) capsular revertants possessed wild-type cap3A genes, indicating the precise excision of the duplication. Additionally, the frequency of phase reversion (off to on) was found to exhibit a linear relationship between (log) frequency of reversion and (log) length of duplication. This apparently random duplication giving rise to phase variation is in stark contrast to the 'preprogrammed' contingency genes in many Gram-negative organisms that possess homopolymeric sequence repeats or motifs for site-specific recombination.