Helicobacter pylori is a common and persistent human pathogen of the gastric mucosa. Surfactant protein D (SP-D), a component of innate immunity, is expressed in the human gastric mucosa and is capable of aggregating H. pylori. Wide variation in the SP-D binding affinity to H. pylori has been observed in clinical isolates and laboratory-adapted strains. The aim of this study was to reveal potential mechanisms responsible for evading SP-D binding and establishing persistent infection. An escape variant, J178V, was generated in vitro, and the lipopolysaccharide (LPS) structure of the variant was compared to that of the parental strain, J178. The genetic basis for structural variation was explored by sequencing LPS biosynthesis genes. SP-D binding to clinical isolates was demonstrated by fluorescence-activated cell sorter analyses. Here, we show that H. pylori evades SP-D binding through phase variation in lipopolysaccharide. This phenomenon is linked to changes in the fucosylation of the O chain, which was concomitant with slipped-strand mispairing in a poly(C) tract of the fucosyltransferase A (fucT1) gene. SP-D binding organisms are predominant in mucus in vivo (P = 0.02), suggesting that SP-D facilitates physical elimination. Phase variation to evade SP-D contributes to the persistence of this common gastric pathogen.