The population of capsulate Haemophilus influenzae is divided into two phylogenetic divisions. Here we show that in division I strains the capsulation (cap) gene cluster lies between direct repeats of a novel insertion sequence (IS)-like element, IS1016. cap has apparently been mobilized in the chromosome as a compound transposon by IS1016, and the repeats have provided a molecular substrate for reversible cap gene amplification, with augmentation of capsule production, through unequal homologous recombination. Such amplification has occurred in serotype b strains, but in these a large direct repeat of cap genes has become fixed in the population. We have found a 1.2 kb deletion at one end of this duplicated capb locus, removing most of one copy of the polysaccharide export gene bexA. We have shown that this makes capsulation dependent on preservation of the direct repeat structure in order to avoid recombination-mediated loss of the other copy of bexA. Type b strains with this cap configuration are disseminated worldwide and currently cause nearly all invasive Haemophilus infections, leading us to speculate that the 1.2 kb deletion occurred in an ancestral type b strain and conferred significant biological advantage.