Background: Endoscopic sphincterotomy is commonly used to remove bile- duct stones and to treat other problems. We prospectively investigated risk factors for complications of this procedure and their outcomes. Methods: We studied complications that occurred within 30 days of endoscopic biliary sphincterotomy in consecutive patients treated at 17 institutions in the United States and Canada from 1992 through 1994. Results: Of 2347 patients, 229 (9.8 percent) had a complication, including pancreatitis in 127 (5.4 percent) and hemorrhage in 48 (2.0 percent). There were 55 deaths from all causes within 30 days; death was directly or indirectly related to the procedure in 10 cases. Of five significant risk factors for complications identified in a multivariate analysis, two were characteristics of the patients (suspected dysfunction of the sphincter of Oddi as an indication for the procedure and the presence of cirrhosis) and three were related to the endoscopic technique (difficulty in cannulating the bile duct, achievement of access to the bile duct by 'precut' sphincterotomy, and use of a combined percutaneous-endoscopic procedure). The overall risk of complications was not related to the patient's age, the number of coexisting illnesses, or the diameter of the bile duct. The rate of complications was highest when the indication for the procedure was suspected dysfunction of the sphincter of Oddi (21.7 percent) and lowest when the indication was removal of bile-duct stones within 30 days of laparoscopic cholecystectomy (4.9 percent). As compared with those who performed fewer procedures, endoscopists who performed more than one sphincterotomy per week had lower rates of complications (8.4 percent vs. 11.1 percent, P=0.03). Conclusions: The rate of complications after endoscopic biliary sphincterotomy can vary widely in different circumstances and is primarily related to the indication for the procedure and to endoscopic technique, rather than to the age or general medical condition of the patient.