Stress ulcer prophylaxis protects against clinically important gastrointestinal bleeding and has gained widespread use. This study compares the efficacy of omeprazole to ranitidine for this indication. This was a prospective, randomized clinical trial. Sixty-seven high-risk patients were randomized to receive either ranitidine 150 mg (N = 35) intravenously daily or omeprazole 40 mg (N = 32) daily orally or by nasogastric route. Patients were monitored for clinically important bleeding. There was no statistically significant difference between treatment groups in the number of patients enrolled, gender, race, or age. The study groups were comparable in regard to the severity of illness based on their similar APACHE II score, duration of ICU stay, duration of ventilator dependence, and mortality rate. A significant difference was found only in regard to the number of risk factors per patient. The ranitidine-treated group had 2.7 risk factors per patient while the omeprazole-treated group had 1.9 (P < 0.05). Eleven patients (31%) given ranitidine and two patients (6%) given omeprazole developed clinically important bleeding (P < 0.05). Nosocomial pneumonia developed in five patients (14%) receiving ranitidine and one patient (3%) receiving omeprazole (P > 0.05). We conclude that oral omeprazole is safe, effective, and clinically feasible for stress ulcer prophylaxis.