We performed a controlled study to evaluate the role of cefonicid in preventing infectious complications related to retrograde cholangiopancreatography (ERCP). Consecutive patients were randomized to receive prophylaxis with cefonicid (1 g intravenously) 1 hour before the procedure or to be untreated controls, During a 26-month period, 179 ERCPs, including 93 therapeutic procedures, were performed on 164 patients. Prophylaxis was administered before 88 procedures (49%). The rate of bacteremia among treated patients was similar to that among controls (3% vs. 2%, respectively; P = .4). The rate of cholangitis was also similar among both groups (8% vs. 2%, respectively; P = .07). There were no episodes of sepsis, and none of the patients died. The rate of bacteremia was also similar among patients undergoing diagnostic procedures and patients undergoing therapeutic procedures, but all cases of cholangitis occurred In the latter group (0 vs. 10%, respectively; P = .002). Nevertheless, the rate of cholangitis was not significantly changed by the use of prophylaxis (14% among treated patients vs. 5% among controls, P = .12). Therefore, infectious complications could not he prevented by cefonicid prophylaxis.