Lifelong infection of the gastric mucosa by Helicobacter pylori can lead to peptic ulcers and gastric cancer. However, how the bacteria maintain chronic colonization in the face of constant mucus and epithelial cell turnover in the stomach is unclear. Here, we present a new model of how H. pylori establish and persist in stomach, which involves the colonization of a specialized microenvironment, or microniche, deep in the gastric glands. Using quantitative three-dimensional (3D) confocal microscopy and passive CLARITY technique (PACT), which renders tissues optically transparent, we analyzed intact stomachs from mice infected with a mixture of isogenic, fluorescent H. pylori strains with unprecedented spatial resolution. We discovered that a small number of bacterial founders initially establish colonies deep in the gastric glands and then expand to colonize adjacent glands, forming clonal population islands that persist over time. Gland-associated populations do not intermix with free-swimming bacteria in the surface mucus, and they compete for space and prevent newcomers from establishing in the stomach. Furthermore, bacterial mutants deficient in gland colonization are outcompeted by wild-type (WT) bacteria. Finally, we found that host factors such as the age at infection and T-cell responses control bacterial density within the glands. Collectively, our results demonstrate that microniches in the gastric glands house a persistent H. pylori reservoir, which we propose replenishes the more transient bacterial populations in the superficial mucosa.