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. 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. 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 all complications (8.4 percent vs. 11.1 percent, P=0.03) and severe complications (0.9 percent vs. 2.3 percent, P=0.01). 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 patients.