Bleeding peptic ulcer is the most important cause of upper gastrointestinal bleeding. Our aim was to compare the effect of anti-Helicobacter therapy with maintenance treatment of H2-receptor antagonist in the prevention of relapses of ulcer and bleeding. Patients with bleeding duodenal or gastric ulcers and H. pylori infection were randomized to receive either a one-week course of triple therapy with bismuth subcitrate, metronidazole, and tetracycline plus ranitidine or a six-week course of ranitidine 300 mg/day. After the ulcers healed, the antibiotic-treated patients were not given any medication, whereas the ranitidine-treated patients continued to receive a maintenance dose of 150 mg/day. One hundred twenty-six patients were randomized to receive anti-Helicobacter therapy and 124 patients to receive long-term ranitidine. H. pylori eradication was achieved in 98.2% in those who received triple therapy and 6.1% in those who received ranitidine (P < 0.0001). At the six-week follow-up, ulcer healing was documented in 88.2% in those who received triple therapy and 86.1% in those who received ranitidine (P = 0.639). Recurrent ulcer developed in nine of the ranitidine-treated patients and three of them presented with recurrent upper gastrointestinal bleeding. One patient in the antibiotic group developed recurrent ulcer without rebleeding (P = 0.01). It is concluded that eradication of H. pylori is sufficient for the prevention of recurrent bleeding ulcers.