To test the ability of cefazolin, given in a single dose preoperatively, to prevent infection in high-risk patients after biliary tract surgery, the authors conducted a double-blind, prospective, randomized, controlled study. Of 92 patients operated on for acute cholecystitis or bile-duct disease, 46 were given 2 g of cefazolin intravenously before operation. Bile was contaminated with bacteria in 36% to 50% of patients with acute cholecystitis, obstructive jaundice, bile-duct disease without jaundice, or over 50 years old compared with only 5% of patients with chronic cholecystitis or under 50 years of age. Postoperative sepsis was eight times more frequent in patients with contaminated bile than in those without. Only 1 patient who received cefazolin had a wound infection, but 9 of the 46 patients in the control group did. The bacteria causing wound sepsis were similar to those in the contaminated bile. The authors conclude that a single dose of cefazolin given intravenously before operation provides effective prophylaxis against infection in high-risk biliary tract surgery.