Gastric bacteria can either be ingested or ascend from the distal bowel; however, their survival is usually limited by gastric acidity and motility. A reduction in gastric acid can result in bacterial overgrowth in the stomach and proximal small bowel, and the number of organisms rises as the intragastric pH rises. The increased risk of noncardia gastric cancer seen in patients with hypochlorhydria may be explained by an excess of nitrites and N-nitroso compounds (NOCs). These compounds are found in the diet of populations with a high gastric cancer risk, but can also be produced by the organisms that exist in the hypochlorhydria stomach. It has long been hypothesized that nitrites and NOCs act as one of the triggers in the atrophy-metaplasia-dysplasia-carcinoma path. However, although indirect data have linked the premalignant changes of metaplasia and dysplasia to NOCs, direct measurement of gastric nitrites and NOCs has not confirmed such a link. The role of Helicobacter pylori in bacterial overgrowth is mainly as a cause of hypochlorhydria resulting from atrophic gastritis, leading to a reduction in the parietal cell mass. Acid-suppressing drugs can result in bacterial overgrowth and increased nitrites and NOCs, although there is no current evidence for an increased risk of gastric cancer in patients taking them. One explanation is that the stomach appears to be colonized by different organisms than those in patients with hypochlorhydria for other reasons. There is some evidence that bacterial overgrowth per se can cause gastric inflammation in mice; however, although in humans the degree of gastric inflammation is greater when overgrowth is more prominent this may simply reflect the greater degree of hypochlorhydria in patients with a more severe H pylori-induced inflammation.