The subjects of this multicenter study were 160 patients with endoscopically confirmed active duodenal ulcers, randomly assigned to receive 40 mg of famotidine or 300 mg of ranitidine nightly for four to eight weeks. During a subsequent six-month maintenance treatment phase, the patients received 20 mg of famotidine or 150 mg of ranitidine nightly. After eight weeks of treatment, ulcer healing was endoscopically confirmed in 94% of the 81 famotidine-treated patients and in 80% of the 79 ranitidine-treated patients (P less than 0.01). During the first week of treatment, daytime and nighttime pain scores were significantly lower in the famotidine-treated than ranitidine-treated patients. During the maintenance treatment phase, the ulcer in 79% of 58 famotidine-treated patients and in 81% of 52 ranitidine-treated patients remained healed. Multivariate analysis of factors such as age, sex, smoking, alcohol and coffee consumption, use of nonsteroidal anti-inflammatory drugs (NSAIDs), history of ulcer, and ulcer size and number showed that they had no significant effects on the differences in healing rates between the two treatment groups. The ulcers were all healed in the famotidine-treated patients whose ulcers were associated with the prior use of NSAIDs. The results of this and many other studies indicate that, unless ulcer healing is confirmed by endoscopy, treatment of active duodenal ulcers should continue for six to eight weeks.