Endoscopic retrograde cholangiopancreatography (ERCP) is complicated by acute pancreatitis in up to 12% of the examinations. One possible mechanism for this complication is the cannulation-induced sphincter of Oddi spasm with temporary pancreatic duct obstruction. Nifedipine is known to relax the sphincter of Oddi, thus possibly inhibiting or reducing post-ERCP ± endoscopic sphincterotomy (EST) pancreatic irritation. To test this hypothesis 166 adult patients undergoing ERCP ± EST were randomized to receive nifedipine (n = 82) 20 mg 3 times at 8-hour intervals during the day of ERCP ± EST or placebo (n = 84) in a double-blind manner. Clinical pancreatitis developed in 6 patients (4%), in 3 patients in each group. Necrotizing pancreatitis developed in 3 patients, 2 (2%) in the nifedipine group and 1 (1 %) in the placebo group. Overall 60 patients (36%) needed medication for post-ERCP ± EST epigastric pain, 27 (33%) in the nifedipine group and 33 (39%) in the placebo group. Of the 87 patients, who did not need any pain medication before ERCP ± EST, 34 (39%) needed pain medication after ERCP ± EST, 14/47 (30%) in the nifedipine group and 20/40 (50%) in the placebo group (p = 0.044). Serum total amylase activity (median) increased from 189 U/l (range 39-11,950 U/l) before ERCP ± EST to 299 U/l (range 43-11,824 U/l) at 12 h (p < 0.001) and 247 U/l (range 34-15,950 U/l) at 24 h (p < 0.001), with no differences between the two groups. Median serum C-reactive protein concentration and blood leukocyte count remained unchanged in both groups. We concluded that nifedipine may reduce the epigastric pain induced by ERCP ± EST, but does not seem to prevent post-ERCP ± EST acute pancreatitis.