Different types of proton pump inhibitor (PPI)-based triple therapies could result in different Helicobacter pylori eradication rates. This study aimed to compare the efficacy and safety of rabeprazole- and lansoprazole-based triple therapies in primary treatment of H. pylori infection. From September 2005 to July 2008, 426 H. pylori-infected patients were randomly assigned to receive a 7-day eradication therapy with either rabeprazole 20mgbid (RAC group, n=222) or lansoprazole 30mgbid (LAC group, n=228) in combination with amoxicillin 1gbid and clarithromycin 500mgbid. The patients received follow-up esophagogastroduodenoscopy (EGD) and/or 13C-urea breath test 12–16 weeks later to define H. pylori status. Their personal and medical history, compliance and side effects were obtained by using a standardized questionnaire. Intention-to-treat analysis revealed that the eradication rate was 87.84% in the RAC group and 85.96% in the LAC group (p=0.56). All patients returned for assessment of compliance (100% in the LAC group vs. 99.50% in the RAC group; p=0.32) and adverse events (7.20% in the RAC group vs. 5.70% in the LAC group, p=0.51). Univariate analysis suggested that patients with nonsteroid anti-inflammatory agent (NSAID) use had lower eradication rates than those without (76.71% vs. 88.74%; p=0.006). Our results showed that efficacy and safety were similar in rabeprazole- and lansoprazole-based primary therapies. The influence of NSAID usage on H. pylori eradication needs to be further investigated.