Upper gastrointestinal endoscopy can be performed without intravenous sedation but the evidence suggests that, in the United Kingdom and United States, most patients and endoscopists prefer that some form of premedication is given. Intravenous diazepam or midazolam are used by the majority of endoscopists. In the UK, the ratio of diazepam to midazolam users is approximately 2:1, while in the USA more endoscopists are now using midazolam. Midazolam is approximately twice as potent as diazepam but, when allowance is made for this, there is probably little or no difference in the propensity of the two drugs to produce respiratory depression. The antegrade amnesic effect of midazolam is significantly superior to that of diazepam. A benzodiazepine/narcotic combination can achieve a smoother and more rapid induction with less gagging and choking, but the incidence of adverse outcomes--particularly respiratory depression--is increased significantly. Over 50% of the deaths that are associated with upper gastrointestinal endoscopy are due to cardiopulmonary problems. Hypoxia is very common if measured using non-invasive monitoring equipment, such as a pulse oximeter. Methods of preventing oxygen desaturation and thus, by inference, most cardiac arrhythmias associated with endoscopy are discussed, as is the role of flumazenil, the new benzodiazepine antagonist.