Previous uncontrolled reports have suggested that H2-antagonists may possess immunomodulatory activity in human immunodeficiency virus (HIV)-infected patients. Such trials reported improvements in HIV-related symptoms, increased absolute CD4 cell numbers, and improvements in other measures of host immunity. The present trial was a randomized, placebo-controlled, double-blind trial of ranitidine 300 mg (orally twice daily) in subjects with early HIV infection (absolute CD4 cells, 400-700/mm3). Eighty-one subjects entered the trial and 73 completed 16 weeks on study medications. There were no significant differences in the time-weighted average change from baseline between the 2 treatment groups in absolute CD4 cell number, plasma HIV RNA level, or most other surrogate markers of HIV infection. Serum beta2-microglobulin levels were significantly lower in placebo than ranitidine recipients. Ranitidine should not be recommended for the treatment of HIV-infected patients unless it is used for established indications.