Short-term antibiotic prophylaxis was studied in 80 patients undergoing biliary or gastric surgery. The patients were randomized to receive 1 g of aztreonam or 80 mg of gentamicin intravenously 30 minutes before surgery and 8 and 16 hours after surgery. Of samples taken from the abdominal cavity for bacteriologic study, 53% were culture positive. Wound infections developed in two (4.5%) of 44 patients receiving aztreonam and in seven (19.4%) of 36 patients treated with gentamicin. Staphylococcus epidermidis and Enterobacter species were isolated from sites of wound infection in the aztreonam group; Escherichia coli (two isolates), Pseudomonas aeruginosa (two isolates), Enterobacter species, Klebsiella species, Enterococcus faecalis, and Aeromonas hydrophila were isolated from the gentamicin group. Our data indicate that aztreonam is safe and effective for the prevention of infections following biliary and gastric surgery.