A prospective, randomized evaluation of operative choledochoscopy was carried out during emergency surgery in patients with acute cholangitis or acute suppurative cholangitis when conservative management had failed. After common bile duct exploration, 79 patients were randomized to have choledochoscopy and 78 patients to the control group. Laboratory and clinical parameters showed that choledochoscopy did not increase the incidence of septicaemia, acute pancreatitis, persistent cholangitis, postoperative wound sepsis, intraperitoneal sepsis and hospital mortality. The incidence of retained common bile duct stones detected by T tube cholangiography performed in the second postoperative week was significantly reduced (P less than 0.01) after choledochoscopy. Choledochoscopy detected stones missed by conventional common bile duct exploration in ten patients. It is concluded that choledochoscopy is a safe and effective technique in patients with acute cholangitis and acute suppurative cholangitis.