OBJECTIVE: The indications on when and how to diagnose and treat ulcerative disease and Helicobacter pylori infection are reasonably clear. The aim of this study was to evaluate the management of H. pylori infection and access to diagnostic tests in primary care. MATERIAL AND METHODS: We performed an observational, cross-sectional study. An anonymous questionnaire was sent to Spanish primary care physicians throughout Spain. Compliance with the major consensus conference recommendations on H. pylori treatment was evaluated. RESULTS: The questionnaire was completed by 991 primary care physicians. A total of 87.7% of respondents reported they had indicated eradication therapy at least once during the previous year: 79.9% for duodenal ulcer, 75.3% for gastric ulcer, and 18.3% for gastroesophageal reflux disease. The treatment schedule was correct according to the consensus in 74.7% of the responses. However, 29% prescribed 14-day therapy, which is longer than the recommended duration. Sixty-seven per cent of practitioners maintained continuous or intermittent anti-secretory treatment in asymptomatic ulcerous patients and did not indicate H. pylori eradication therapy. The availability of different tests was as follows: 64.7% of respondents had access to endoscopy, 67.4% to urea breath test, 59.6% to serology, and 11.9% to the H. pylori stool antigen test. There were substantial regional variations in access to diagnostic tests. CONCLUSIONS: Management of H. pylori infection is reasonably well adapted to consensus recommendations. Nevertheless, there is marked geographic variation and substantial restrictions in access to diagnostic tests, which hampers application of the recommendations.