The rfb region specifies the structure of lipopolysaccharide side chains that comprise the diverse gram-negative bacterial somatic (O) antigens. The rfb locus is adjacent to gnd, which is a polymorphic gene encoding 6-phosphogluconate dehydrogenase. To determine if rfb and gnd cotransfer, we sequenced gnd in five O55 and 13 O157 strains of Escherichia coli E. coli O157:H7 has a gnd allele (allele A) that is only 82% identical to the gnd allele (allele D) of closely related E. coli O55:H7. In contrast, gnd alleles of E. coli O55 in distant lineages are >99.9% identical to gnd allele D. Though gnd alleles B and C in E. coli O157 that are distantly related to E. coli O157:H7 are more similar to allele A than to allele D, there are nucleotide differences at 4 to 6% of their sites. Alleles B and C can be found in E. coli O157 in different lineages, hut we have found allele A only in E. coli O157 helonging to the DEC5 lineage. DNA 3' to the O55 gnd allele in diverse E. coli lineages has sequences homologous to tnpA of the Salmonella enterica serovar Typhimurium IS200 element, E. coli Rhs elements (including an H-rpt gene), and portions of the O111 and O157 rfb regions. We conclude that rfb and gnd cotransferred into E. coli O55 and O157 in widely separated lineages and that recombination was responsible for recent antigenic shifts in the emergence of pathogenic E. coli O55 and O157.