Background Helicobacter pylori is one of the most common gastric pathogens, affecting at least half the world's population, and is strongly associated with gastritis, peptic ulcer, gastric adenocarcinoma, and lymphoma. We aimed to assess the efficacy, safety, and immunogenicity of a three-dose oral recombinant H pylori vaccine in children in China. Methods We did this randomised, double-blind, placebo-controlled, phase 3 trial at one centre in Ganyu County, Jiangsu Province, China. Healthy children aged 6-15 years without past or present H pylori infection were randomly assigned (1:1), via computer-generated randomisation codes in blocks of ten, to receive the H pylori vaccine or placebo. Participants, their guardians, and study investigators were masked to treatment allocation. The primary efficacy endpoint was the occurrence of H pylori infection within 1 year after vaccination. We did analysis in the per-protocol population. This trial is registered with ClinicalTrials.gov, number NCT02302170. Findings Between Dec 2, 2004, and March 19, 2005, we randomly assigned 4464 participants to either the vaccine group (n=2232) or the placebo group (n=2232), of whom 4403 (99%) participants completed the three-dose vaccination schedule and were included in the per-protocol efficacy analysis. We extended follow-up to 3 years. We recorded 64 events of H pylori infection within the first year (14 events in 2074·3 person-years at risk in the vaccine group vs 50 events in 2089·6 person-years at risk in the placebo group), resulting in a vaccine efficacy of 71·8% (95% CI 48·2-85·6). 157 (7%) participants in the vaccine group and 161 (7%) participants in the placebo group reported at least one adverse reaction. Serious adverse events were reported in five (<1%) participants in the vaccine group and seven (<1%) participants in the placebo group, but none was considered to be vaccination related. Interpretation The oral recombinant H pylori vaccine was effective, safe, and immunogenic in H pylori-naive children. This vaccine could substantially reduce the incidence of H pylori infection; however, follow up over a longer period is needed to confirm the protection of the vaccine against H pylori-associated diseases. © 2015 Elsevier Ltd.