The incidence of stomach cancer is high in certain parts of the world, particularly in China. Chronic Helicobacter pylori infection is the main risk factor, yet the vast majority of infected individuals remain unaffected with cancer, suggesting an important role of other risk factors. We conducted a population-based case-control study including 196 incident stomach cancer cases and 397 matched controls to test the hypothesis that adverse single nucleotide polymorphism (SNP) genotypes and haplotypes within genes of the DNA repair and immune regulatory pathways are associated with increased stomach cancer risk. Genomic DNA isolated from blood samples was used for genotyping, and results were obtained for 57 putatively functional SNPs in 28 genes. Odds ratios (OR) and 95% confidence intervals (95% CI) were obtained from adjusted logistic regression models. For PTGS2, a gene involved in the inflammatory response, associations with stomach cancer risk were observed for TC genotype carriers of rs5279 (OR, 0.24; 95% CI, 0.08-0.73), CT genotype carriers of the 3'-untranslated region SNP rs689470 (OR, 7.49; 95% CI, 1.21-46.20), and CTTC haplotype carriers of rs5277, rs5278, rs5279, and rs689470 (OR, 0.41; 95% CI, 0.18-0.95). For ERCC5, a gene involved in nucleotide excision repair, TC genotype carriers of rs1047768 (OR, 0.65; 95% CI, 0.41-1.03), GC genotype carriers of the nonsynonymous SNP rs2227869 (OR, 0.30; 95% CI, 0.13-0.67), and CCG haplotype carriers of rs1047768, rs17655, and rs2227869 (OR, 0.45; 95% CI, 0.20-1.04) were associated with reduced stomach cancer risk. In conclusion, PTGS2 and ERCC5 were associated with stomach cancer risk in a Chinese population.