Emergency surgical treatment for nonvariceal bleeding of the upper part of the gastrointestinal tract. Endoscopic and biochemical data were collected prospectively from 1,530 patients admitted with nonvariceal bleeding of the upper part of the gastrointestinal tract between September 1985 and June 1989. Therapeutic endoscopy was done for 93 patients who underwent emergency surgical treatment for bleeding, subsequently required in 29 patients with seven postoperative fatalities. In contrast, 31 (15.7 per cent) of 198 patients (mortality rate of 9.6 per cent at 30 days) died in the hospital who had undergone emergency operation in whom therapeutic endoscopy had not been performed; data for this latter group is now presented. At admission, a greater likelihood of emergency operation was associated with a systolic blood pressure of 100 millimeters of mercury and endoscopic stigmatas of recent hemorrhage (ESRH) (p less than 0.001). Rebleeding rates for the presence of fresh blood, active spurting and oozing hemorrhage or visible vessel in an ulcer base were 26.5, 28.9 and 35.9 per cent, respectively. Endoscopic stigmatas were thus associated with an increased risk of bleeding (p less than 0.0001) and rebleeding led to a sixfold increase in the mortality rate. Congestive cardiac failure, chronic obstructive airway disease, chronic renal failure and a history of previous malignant disease were each associated with postoperative mortality rates of more than 50 per cent. An increased risk of mortality after emergency operation was related to age (p less than 0.0001), preoperative (p less than 0.002) and total (p less than 0.0001) blood transfusion requirement. Immediate operation after resuscitation and endoscopy was required in 87 patients; 11 deaths (hospital mortality rate of 12.7 per cent and 9.2 per cent at 30 days) occurred in this group compared with 20 fatalities (18.0 per cent) documented in 111 patients (9.9 per cent at 30 days) who underwent surgical treatment for rebleeding. We conclude that age, concomitant medical illness and preoperative and total transfusion requirements are each related to outcome after emergency operations. Such urgent intervention is best avoided if at all possible in patients with severe concomitant medical illness. 