A total of 131 patients with acute pancreatitis (of whom 100 had gallstones) underwent endoscopic retrograde cholangiopancreatography (ERCP) during the same hospital admission. Urgent ERCP (less than 72 h) was performed in 68 cases and early ERCP (3-30 days) in 63 cases; 47 had predicted severe attacks and 84 had predicted mild attacks (modified Glasgow criteria). The highest incidence of common bile duct stones occurred in those with predicted severe attacks and those who had urgent ERCP. Highly significant correlations were found between age and common bile duct and pancreatic duct diameters. Significant correlations were also found between the common bile duct and pancreatic duct (correcting for age) and between these and the admission serum bilirubin. The common bile duct diameter was greatest in those with common bile duct stones and predicted severe attacks. A considerably lower incidence of pancreatic duct filling occurred in those with predicted severe attacks and common bile duct stones; in predicted mild attacks the pancreatic duct diameter was greater in those with common bile duct stones. In gallstone patients complications were highest in those with predicted severe attacks but more significantly in those with common bile duct stones. Endoscopic sphincterotomy was undertaken in 37 patients with common bile duct stones without mortality. The overall complication rate in gallstone patients was 19 per cent and the mortality rate was 2 per cent. These findings suggest that common bile duct stones cause acute common bile duct and pancreatic duct obstruction and are closely associated with complications. Urgent ERCP for detection of common bile duct stones, and endoscopic sphincterotomy for treatment, is strongly recommended for patients with predicted severe attacks due to gallstones and should also be considered for others who fail to show clinical improvement.