Randomized, controlled trials have shown that prophylactic antibiotics are effective in preventing surgical-wound infections. However, it is uncertain how the timing of antibiotic administration affects the risk of surgical-wound infection in actual clinical practice. We prospectively monitored the timing of antibiotic prophylaxis and studied the occurrence of surgical-wound infections in 2847 patients undergoing elective clean or "clean-contaminated" surgical procedures at a large community hospital. The administration of antibiotics 2 to 24 hours before the surgical incision was defined as early; that during the 2 hours before the incision, as preoperative; that during the 3 hours after the incision, as perioperative; and that more than 3 but less than 24 hours after the incision, as postoperative. Of the 1708 patients who received the prophylactic antibiotics preoperatively, 10 (0.6 percent) subsequently had surgical-wound infections. Of the 282 patients who received the antibiotics perioperatively, 4 (1.4 percent) had such infections (P = 0.12; relative risk as compared with the preoperatively treated group, 2.4; 95 percent confidence interval, 0.9 to 7.9). Of 488 patients who received the antibiotics postoperatively, 16 (3.3 percent) had wound infections (P less than 0.0001; relative risk, 5.8; 95 percent confidence interval, 2.6 to 12.3). Finally, of 369 patients who had antibiotics administered early, 14 (3.8 percent) had wound infections (P less than 0.0001; relative risk, 6.7; 95 percent confidence interval, 2.9 to 14.7). Stepwise logistic-regression analysis confirmed that the administration of antibiotics in the preoperative period was associated with the lowest risk of surgical-wound infection. We conclude that in surgical practice there is considerable variation in the timing of prophylactic administration of antibiotics and that administration in the two hours before surgery reduces the risk of wound infection.