Twenty-four-hour gastric and esophageal pH were monitored simultaneously in 19 patients with moderate esophagitis before and after a randomized crossover treatment with 40 mg famotidine or 300 mg ranitidine. Gastroesophageal reflux in patients with esophagitis was compared with that in 22 healthy controls. Patients with esophagitis had more esophageal acidity than controls; the percentage of time with esophageal pH less than 4 was significantly greater during a 24-h period (p less than 0.01) both in the upright (p less than 0.01) and in the supine (p less than 0.01) position. In esophagitis patients the percentage of time with pH less than 4 during the total 24-h period correlated closely with acid reflux in the upright (p less than 0.001) and supine (p less than 0.01) position. This indicates that daytime reflux is probably as injurious to the esophagus as nighttime reflux. Famotidine and ranitidine decreased gastric acidity during the entire 24-h period (p less than 0.001) but not during the daytime or early evening. The inhibitory effect lasted slightly longer with famotidine (12 h) than with ranitidine (10 h). Famotidine and ranitidine reduced esophageal acidity during the entire 24-h period (p less than 0.001) and particularly during the nighttime (p less than 0.001) but not during the daytime. Famotidine and ranitidine also did not modify the esophageal acid clearance. Nightly doses of famotidine or ranitidine were ineffective in reducing GER during daytime hours.