Objectives: Compared to cephalosporin-based prophylaxis, ertapenem prophylaxis lowers the risk of surgical site infection among carriers of extended-spectrum b-lactamase-producing Enterobacterales (ESBL-PEs) undergoing colorectal surgery. We aimed to determine whether ertapenem prophylaxis leads to increased postoperative colonization with carbapenem-resistant Enterobacterales (CREs) and thirdgeneration-cephalosporin-resistant Enterobacterales (3GCR-Es). Methods: This study was nested within a quality improvement study of prophylaxis for ESBL-PE carriers undergoing colorectal surgery. Patients were screened 4e6 days after surgery for carriage of ESBL-PEs or other 3GCR-Es and CREs. When CREs were detected, pre-and postsurgical clones were compared using Fourier-transform infrared (FT-IR) spectroscopy. Results: The sample consisted of 56 patients who carried ESBL-PEs before surgery and received cefuroxime/metronidazole prophylaxis (Group 1), 66 who carried ESBL-PEs before surgery and received ertapenem (Group 2), and 103 ESBL-PE non-carriers who received cefuroxime/metronidazole prophylaxis (Group 3). CRE carriage was detected postoperatively in one patient (1.5%) in Group 2 versus eight patients (14.3%) in Group 1 (RD e12.8%; 95%CI e22.4% to e3.1%). For seven out of nine patients, preoperative ESBL-PE and postoperative CRE isolates were compared; in five of them, the pre-and postoperative clones were identical. Postoperative 3GCR-E carriage was detected in 37 patients (56.1%) in Group 2 versus 46 patients in Group 1 (82.1%) (aRD e20.7%, 95%CI e37.3% to e4.1%). Conclusions: Among ESBL-PE carriers undergoing colorectal surgery, detection of short-term postsurgical colonization by CREs and 3GCR-Es was significantly lower among patients who received ertapenem prophylaxis than those who received cephalosporinemetronidazole prophylaxis. Resistance