The risk of gastric cancer (GC) associated with dietary intake of nitrosodimethylamine (NDMA) and endogenous formation of nitroso compounds (NOCs) was investigated in the European Prospective Investigation into Cancer and Nutrition (EPIC). The study included 521 457 individuals and 314 incident cases of GC that had occurred after 6.6 average years of follow-up. An index of endogenous NOC (ENOC) formation was estimated using data of the iron content from meat intake and faecal apparent total NOC formation according to previous published studies. Antibodies to Helicobacter pylori and vitamin C levels were measured in a sub-sample of cases and matched controls included in a nested case-control within the cohort. Exposure to NDMA was < 1 mu g on average compared with 93 mu g on average from ENOC. There was no association between NDMA intake and GC risk (HR, 1.00; 95% CI, 0.7-1.43). ENOC was significantly associated with non-cardia cancer risk (HR, 1.42; 95% CI, 1.14-1.78 for an increase of 40 mu g/day) but not with cardia cancer (HR, 0.96; 95% CI, 0.69-1.33). Although the number of not infected cases is low, our data suggest a possible interaction between ENOC and H.pylori infection (P for interaction = 0.09). Moreover, we observed an interaction between plasma vitamin C and ENOC (P < 0.02). ENOC formation may account for our previously reported association between red and processed meat consumption and gastric cancer risk.