Background:Upper gastrointestinal (GI) bleeding remains a problem in critically ill-newborns. The use of H2 blockers, by maintaining gastric pH ³ 4, reduces the risk of stress-ulceration and gastric hemorrhage. This study therefore, has evaluated the effects of short-term prophylactic ranitidine in controlling gastric pH and prevention of GI bleeding in neonates. Methods: This randomized controlled study was carried out on 80 neonates admitted to Neonatal Intensive Care Unit ward of Nemazee Hospital, Shiraz, Iran. They were randomly divided into case and control groups and their gastric pH, stool occult blood and macroscopic bleeding were determined. Intravenous ranitidine was administrated (5 mg/kg/day) for four days in case group. Their gastric pH was measured before, one hrs, and two or three days after injection and successful prophylactic treatment was considered if gastric pH was ³ 4. Results: Upper GI bleeding was observed in 41% of all patients. After ranitidine, there was a significant increase in gastric pH which accompanied with the reduction of the frequency of upper GI bleeding. Furthermore, no significant changes were noted in gastric pH of control group. Conclusion: Prophylaxis with ranitidine seems to reduce the frequency of upper GI bleeding by significantly increasing gastric pH.