Background: Incidental perforation in rectal cancer surgery is considered a risk factor for poorer oncological outcome. Most studies emanate from the era before total mesorectal excision when staging, neoadjuvant treatment and surgical technique were suboptimal. This study assessed the impact of incidental perforation on oncological outcome in a cohort of patients with optimized management. Methods: Data from the Swedish Colorectal Cancer Registry for patients undergoing R0 abdominal surgery for TNM stage I–III rectal cancer between 2007 and 2012, with 5-year follow-up, were analysed. Multivariable analysis was performed. Results: In total, 6176 patients were analysed (208 with and 5968 without perforation). The local recurrence rate was increased after perforation (7·2 per cent (15 of 208) versus 3·2 per cent (188 of 5968); P = 0·001), but there were no differences in rates of distant metastasis (16·3 per cent (34 of 208) versus 19·8 per cent (1183 of 5968); P = 0·215) and overall recurrence (20·7 per cent (43 of 208) versus 21·0 per cent (1256 of 5968); P = 0·897). The 5-year overall survival rate was lower after perforation (66·4 versus 75·5 per cent; P = 0·002), but the 5-year relative survival rate was no different (79·9 versus 88·2 per cent; P = 0·083). In multivariable analysis, perforation was a risk factor for local recurrence (hazard ratio 2·10, 95 per cent c.i. 1·19 to 3·72; P = 0·011), but not for the other outcomes. Conclusion: Incidental perforation remains a significant risk factor for LR, even with optimized management of rectal cancer. This must be considered when discussing adjuvant treatment and follow-up.