A prospective study was carried out in 428 subjects (212 controls and 216 patients) to evaluate the delayed cell-mediated immune response preoperatively in patients with biliary lithiasis. The delayed hypersensitivity response was assessed by a Multitest and subjects were classified as immunocompetent, relatively anergic or anergic. Significant differences were found between control subjects and patients with cholelithiasis compared with those with acute cholecystitis (P less than 0.01), non-icteric choledocholithiasis (P less than 0.01) and choledocholithiasis with jaundice (P less than 0.05). There were also differences between patients with icteric and non-icteric choledocholithiasis (P less than 0.02). Seven possible causative factors for anergy were evaluated: a haemoglobin concentration of less than or equal to 12 g/l and a haematocrit of less than or equal to 35 per cent were related to the appearance of anergy and relative anergy in patients with acute cholecystitis. Bilirubin levels greater than or equal to 34 mumol/l were found in 60 per cent of patients with choledocholithiasis and relative anergy and in 80 per cent of those who were anergic (P less than 0.001). These results show a high incidence of failure of the cell-mediated immune response in patients with acute cholecystitis (71 per cent) and icteric choledocholithiasis (82 per cent). In the latter, jaundice appears to be associated with this failure. A close correlation between relatively anergic and anergic state and the development of postoperative septic complications was found.