Background: Both obesity and the presence of collagenolytic bacterial strains (Enterococcus faecalis) can increase the risk of anastomotic leak. The aim of this study was to determine whether mice chronically fed a high-fat Western-type diet (WD) develop anastomotic leak in association with altered microbiota, and whether this can be mitigated by a short course of standard chow diet (SD; low fat/high fibre) before surgery.Methods: Male C57BL/6 mice were assigned to either SD or an obesogenic WD for 6 weeks followed by preoperative antibiotics and colonic anastomosis. Microbiota were analysed longitudinally after operation and correlated with healing using an established anastomotic healing score. In reiterative experiments, mice fed a WD for 6 weeks were exposed to a SD for 2, 4 and 6 days before colonic surgery, and anastomotic healing and colonic microbiota analysed.Results: Compared with SD-fed mice, WD-fed mice demonstrated an increased risk of anastomotic leak, with a bloom in the abundance of Enterococcus in lumen and expelled stool (65-90 per cent for WD versus 4-15 per cent for SD; P = 0⋅010 for lumen, P = 0⋅013 for stool). Microbiota of SD-fed mice, but not those fed WD, were restored to their preoperative composition after surgery. Anastomotic healing was significantly improved when WD-fed mice were exposed to a SD diet for 2 days before antibiotics and surgery (P < 0⋅001).