To assess the safety and efficacy of intravenous sedation in pediatric upper endoscopy, all elective outpatient procedures performed during a 2-year period (January 1, 1991 through December 31, 1992) were retrospectively reviewed. Of 614 children, 553 received intravenous meperidine and midazolam; 61 received fentanyl and midazolam. The mean dose of meperidine was 1.5 +/- 0.7 mg/kg and of fentanyl 0.0031 +/- 0.0014 mg/kg. Less midazolam was needed for children receiving fentanyl than for those receiving meperidine (0.05 +/- 0.03 mg/kg versus 0.08 +/- 0.05 mg/kg, p < 002). Recovery time (minutes) was shorter for those receiving fentanyl (74.7 +/- 22.8 versus 95.1 +/- 23.0, p < .003). Side effects occurred in 117 patients (19.1%), of which the majority were mild (83%); all were transient with no residual sequelae. Inability to complete the procedure occurred in fewer than 1%. We conclude that both combinations of medication are safe and effective for children of all ages. The use of fentanyl/midazolam results in a shorter recovery time and a lower dose of midazolam.