Several conditions associated with reduced gastric acid secretion confer an altered risk of developing a gastric malignancy. Helicobacter pylori-induced atrophic gastritis predisposes to gastric adenocarcinoma, autoimmune atrophic gastritis is a precursor of type I gastric neuroendocrine tumours, whereas proton pump inhibitor (PPI) use does not affect stomach cancer risk. We hypothesised that each of these conditions was associated with specific alterations in the gastric microbiota and that this influenced subsequent tumour risk. 95 patients (in groups representing normal stomach, PPI treated, H. pylori gastritis, H. pylori-induced atrophic gastritis and autoimmune atrophic gastritis) were selected from a cohort of 1400. RNA extracted from gastric corpus biopsies was analysed using 16S rRNA sequencing (MiSeq). Samples from normal stomachs and patients treated with PPIs demonstrated similarly high microbial diversity. Patients with autoimmune atrophic gastritis also exhibited relatively high microbial diversity, but with samples dominated by Streptococcus. H. pylori colonisation was associated with decreased microbial diversity and reduced complexity of co-occurrence networks. H. pylori-induced atrophic gastritis resulted in lower bacterial abundances and diversity, whereas autoimmune atrophic gastritis resulted in greater bacterial abundance and equally high diversity compared to normal stomachs. Pathway analysis suggested that glucose-6-phospahte1-dehydrogenase and D-lactate dehydrogenase were over represented in H. pylori-induced atrophic gastritis versus autoimmune atrophic gastritis, and that both these groups showed increases in fumarate reductase. Autoimmune and H. pylori-induced atrophic gastritis were associated with different gastric microbial profiles. PPI treated patients showed relatively few alterations in the gastric microbiota compared to healthy subjects.